AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-41698

dannymcc's questions

Martin Hope
dannymcc
Asked: 2013-07-21 03:40:24 +0800 CST

使用 Puppet 创建用户帐户?

  • 4

我刚刚开始使用 Puppet,我的测试 site.pp 文件中有以下代码:

class { 'account': {
  'danny':
     home_dir => '/home/danny',
     groups   => [ 'sudo', 'users' ],
     password => 'password'
  }
}

我正在尝试使用 Puppet Forge 的帐户模块。我检查了模块是否安装正确。

使用上述代码时给出的错误是:

错误:无法从远程服务器检索目录:服务器上的错误 400:无法解析环境生产:“{”处的语法错误;/etc/puppet/manifests/site.pp:12 节点 testpuppet.domain.io 上的预期“}”警告:未在失败的目录上使用缓存错误:无法检索目录;跳过跑步

site.pp 的第 12 行是:

class { 'account': {

该文档提供了以下示例:

account { 
  'sysadmin':
    home_dir => '/opt/sysadmin',
    groups   => [ 'sudo', 'users' ],
    ssh_key  => 'AAAAB3NzaC1yc2EAAAABIwAAAQEArfQmMkvtWRnwas3DIti9qAuSFQXKcE0kdp5f42PP8l2kTytJPPWp5T/q8PXDQ2d2X5KplMCMDiUQkchqhmDp840jsqBQ9iZPejAjv3w2kITgScFNymAcErtzX52iw4lnUyjZzomCW8G3YthQMaRm2NkI4wcVcjzq+SKyTfzrBoH21RgZlfcx+/50AFRrarpYqel9W5DuLmmShHxD8clPS532Z/1X+1jCW2KikUhdo98lxYTIgFno05lwFOS9Ry89UyBarn1Ecp1zXpIBE7dMQif3UyLUTU9zCVIoZiJj4iO5lemSSV0v8GL97qclBUVJpaCpc4ebR7bhi0nQ28RcxQ==',
    comment   => 'SysAdmin user',
}

我正在使用的所有其他模块都在一个类中,例如 NTP 模块:

class { 
  '::ntp': 
  servers => [ 
    '0.uk.pool.ntp.org', 
    '1.uk.pool.ntp.org', 
    '2.uk.pool.ntp.org', 
    '3.uk.pool.ntp.org' 
  ], 
}

使用 account 模块的正确语法是什么?

puppet
  • 2 个回答
  • 17640 Views
Martin Hope
dannymcc
Asked: 2013-02-28 06:05:16 +0800 CST

从一个路由器路由到另一个?

  • 0

我正在尝试从一个基本路由器路由到一个 pfsense 盒子。这基本上是为了让我可以在路由器和 VPN 隧道上都有 VPN 用户来测试哪个路由器性能最好。我还试图用 VLAN 隔离网络,而现有路由器不能很好地完成这项工作。

目前网络看起来像这样:

Draytek (existing router)
192.168.1.99
Network is 192.168.1.0/24

LAN port connected to WAN port on new router


pfSense (new router)
10.1.1.1
Network is 10.1.1.0/24
WAN port of this router has an IP of 192.168.1.115

我已经在两个路由器上设置了路由。在现有路由器上,我有以下内容:

10.1.1.0/24 routes to gateway IP address 192.168.1.115. 

在新路由器上,我有以下静态路由:

192.168.1.0/24 routes to gateway IP address 192.168.1.99

路由在它们之间不起作用,我是不是做错了什么。我认为这是只见树木不见森林的情况。

两个路由器都不能ping通对方。

routing
  • 2 个回答
  • 2600 Views
Martin Hope
dannymcc
Asked: 2013-02-18 09:55:55 +0800 CST

Exchange Server 2007 丢失邮箱和通讯组

  • 3

我之前在使用我们的 Exchange 2007 服务器时遇到了一些问题,导致它无法连接到我们的域控制器。

我设法连接到域控制器,现在我可以登录并查看我的电子邮件。但是,在 Exchange Server 而不是在域控制器上创建的任何用户现在都丢失了他们的邮箱。同样,创建的任何通讯组也丢失了。

据我所知,根本没有任何损坏。邮箱数据库已被“清理”,但“已断开连接的邮箱”选项卡中未显示任何邮箱。

我已将收件人范围更改为每个可用选项,但我似乎仍然看不到丢失的邮箱。

如果丢失邮箱的用户尝试登录到 OWA,他们会收到与此类似的错误:

Outlook Web Access could not find a mailbox for S-1-5-21-4025249410-3730884854-1808593348-1187. If the problem continues, contact technical support for your organization and tell them the following: The mailbox may be stored on a Microsoft Exchange 2000 or Microsoft Exchange 2003 server, or the Active Directory user account was created recently and has not yet replicated to the Active Directory site where this Client Access server is hosted.

字符串S-1-5-21-4025249410-3730884854-1808593348-1187因人而异。

dcdiag.exe 显示大量错误 - 我正在努力找出复制错误的来源:

 Warning: EXCHANGE01 is not advertising as a time server.

 ......................... EXCHANGE01 failed test Advertising

 There are warning or error events within the last 24 hours after the

 SYSVOL has been shared.  Failing SYSVOL replication problems may cause

 Group Policy problems. 
 ......................... EXCHANGE01 failed test DFSREvent

 A warning event occurred.  EventID: 0x80000785

    Time Generated: 02/17/2013   17:59:39

    Event String:

    The attempt to establish a replication link for the following writable directory partition failed. 


 A warning event occurred.  EventID: 0x80000785

    Time Generated: 02/17/2013   17:59:39

    Event String:

    The attempt to establish a replication link for the following writable directory partition failed. 


 A warning event occurred.  EventID: 0x80000785

    Time Generated: 02/17/2013   17:59:39

    Event String:

    The attempt to establish a replication link for the following writable directory partition failed. 


 [CARBON] DsBindWithSpnEx() failed with error -2146893022,

 The target principal name is incorrect..
 Warning: CARBON is the Schema Owner, but is not responding to DS RPC

 Bind.

 [CARBON] LDAP bind failed with error 8341,

 A directory service error has occurred..
 Warning: CARBON is the Schema Owner, but is not responding to LDAP

 Bind.

 Warning: CARBON is the Domain Owner, but is not responding to DS RPC

 Bind.

 Warning: CARBON is the Domain Owner, but is not responding to LDAP

 Bind.

 Warning: CARBON is the PDC Owner, but is not responding to DS RPC

 Bind.

 Warning: CARBON is the PDC Owner, but is not responding to LDAP Bind.

 Warning: CARBON is the Rid Owner, but is not responding to DS RPC

 Bind.

 Warning: CARBON is the Rid Owner, but is not responding to LDAP Bind.

 Warning: CARBON is the Infrastructure Update Owner, but is not

 responding to DS RPC Bind.

 Warning: CARBON is the Infrastructure Update Owner, but is not

 responding to LDAP Bind.

 ......................... EXCHANGE01 failed test KnowsOfRoleHolders

 ......................... EXCHANGE01 failed test Replications

 ......................... EXCHANGE01 failed test RidManager

    w32time Service is stopped on [EXCHANGE01]

 ......................... EXCHANGE01 failed test Services
exchange-2007
  • 1 个回答
  • 698 Views
Martin Hope
dannymcc
Asked: 2013-01-04 17:14:05 +0800 CST

UPS 失去主电源时带外通知?

  • 4

我们目前正在考虑升级我们的 UPS,并可能在现场安装一台小型汽油发电机,以防 UPS 电池使用时间足够长以将其完全耗尽。

实际上,我们只能负担得起大约 45 分钟的 UPS。我们的大楼停电 4-6 小时并非闻所未闻。这是非常罕见的。

有哪些产品可以在 UPS 切换到电池供电时发送通知(短信、自动呼叫等)?我们研究过的某些 UPS 具有串行连接。你如何处理这种事情?

计划是当电力下降时,电池接管并提醒团队。我们中的一个人(任何随叫随到的人)驾驶大楼并启动发电机。当然,除非收到电源已恢复的通知。

我们目前确实使用 Pingdom 来监控我们服务的正常运行时间。这只是一个 ping 测试,所以我们不能依赖丢失的主机来解释它丢失的原因。例如; 如果网络连接中断,备份链接也中断,我们会收到通知。这并不一定意味着需要启动发电机。

monitoring
  • 3 个回答
  • 1980 Views
Martin Hope
dannymcc
Asked: 2012-12-14 06:29:37 +0800 CST

是否可以在 traceroute 跃点中包含交换机?

  • 24

我想知道在运行内部跟踪路由时是否完全可以显示Dell Powerconnect 2848开关。这将有助于诊断问题,并使查看问题发生的位置变得更加容易。

根据数据表,此特定交换机可识别第 2 层和第 3 层。我不完全确定那是什么意思。

这可能吗?

routing
  • 3 个回答
  • 68231 Views
Martin Hope
dannymcc
Asked: 2012-11-28 13:59:33 +0800 CST

在 vSphere 中增加 VM 大小后增加 Linux 分区?

  • 2

我有一个在 VMWares ESXi 5.1 上运行的 Ubuntu 12.04 虚拟机。

服务器(VM)本身已经空间不足,结果df -h如下:

Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        19G   17G  1.2G  94% /
udev            490M  4.0K  490M   1% /dev
tmpfs           200M  232K  199M   1% /run
none            5.0M     0  5.0M   0% /run/lock
none            498M     0  498M   0% /run/shm

原始 VM HDD 大小不到 19GB,现在我在 vCenter GUI 中增加到 100GB:

vCenter GIU

有没有简单的方法可以做到这一点?VM 似乎根本不承认增加。

virtual-machines
  • 3 个回答
  • 6604 Views
Martin Hope
dannymcc
Asked: 2012-11-02 03:17:15 +0800 CST

PFsense VPN 所有类型都失败了吗?

  • 2

我正在尝试配置一个新的 PFsense 路由器(64 位)并试图让 VPN 功能正常工作。

我启用了 PPTP、L2TP 和 IPSec。我在测试时添加了允许所有 LAN、WAN 和每种 VPN 类型的所有规则。

L2TP 原始日志 l2tps:进程 25991 已启动,版本 4.4.1(root@FreeBSD_8.0_pfSense_2.0-AMD64.snaps.pfsense.org 13:49 11-Aug-2011)l2tps:未找到标签“启动”l2tps:[l2tp0 ] 使用接口 l2tp0 l2tps:L2TP:等待 0.0.0.0 1701 上的连接

PPTP 原始日志 pptps:进程 60043 已启动,版本 4.4.1(root@FreeBSD_8.0_pfSense_2.0-AMD64.snaps.pfsense.org 13:49 11-Aug-2011)pptps:未找到“启动”标签 pptps:PPTP:等待 0.0.0.0 pptps 上的连接:[pt0] 使用接口 pptpd0

IPSec 原始日志 racoon:[94.197.127.20] 错误:在任何适用的 rmconf 中不允许交换身份保护。

我无法使用我的测试设备 (iPhone 5) 连接到它们中的任何一个。他们的 iPhone 只是说连接然后最终失败说远程服务器没有响应。

这是一个已知问题还是我遗漏了一些明显的问题?

其他设置

在此处输入图像描述 在此处输入图像描述 在此处输入图像描述 在此处输入图像描述 在此处输入图像描述

vpn
  • 3 个回答
  • 8319 Views
Martin Hope
dannymcc
Asked: 2012-08-03 02:49:39 +0800 CST

Brew 安装 imagemagick curl 失败

  • 3

尝试在 OS X Mountain Lion 上通过 brew 安装 imagemagick 时出现以下错误。它似乎是一个 curl 错误 - 因此为什么它在 SF 而不是另一个 Stack Exchange 站点上。

brew install imagemagick
==> Installing imagemagick dependency: pkg-config
==> Downloading http://pkgconfig.freedesktop.org/releases/pkg-config-0.27.tar.gz

curl: (7) couldn't connect to host
Error: Download failed: http://pkgconfig.freedesktop.org/releases/pkg-config-0.27.tar.gz

运行命令时是否可以选择其他下载位置brew install imagemagick?

这是一个已知问题吗,我已经搜索过类似的问题,但似乎没有一个是相同的。

mac-osx
  • 2 个回答
  • 1925 Views
Martin Hope
dannymcc
Asked: 2012-07-18 01:16:49 +0800 CST

运行命令以解压缩带时间戳的文件夹中的文件?

  • 1

我有一个 .tar 文件,每晚由我们的一个客户管理系统传输到我们的服务器。该文件是一个压缩的 .sql 文件,我需要将其解压缩并转储到我们的数据库中。

.tar 文件的目录是/root/backups/premvet_sync/2012.07.17.10.09.19. 如您所见,该目录是文件上传到我们服务器时的时间戳。

我正在尝试创建一个将 CD 放入目录然后解压缩的 cron 作业。我通常使用的命令是这样的:

cd /root/backups/premvet_sync/2012.07.17.10.09.19 && tar -xvf backupfile.tar

显然该命令只会运行一次(当时间戳与 cron 作业路径匹配时)。有什么办法可以将 CD 放入最新目录吗?

如果有任何区别,服务器正在运行 Ubuntu 10.04 LTS。

更新

对于任何感兴趣的人,这是最终的(有效的)bash 脚本。

#!/bin/sh
# Untar backup database and dump into local mysql server.

echo "Finding latest backup directory"
dir=$(ls -td1 /root/backups/backup/* | head -1)

echo "Opening latest backup directory"
cd $dir

echo "Uncompress backup
tar -xvf backup.tar

echo "Dig down into correct directory"
cd $dir/backup/databases/MySQL

echo "mysqldump the compressed database file"
gunzip < backup.sql.gz | mysql -u USERNAME -pPASSWORD restore_db_name

echo "Done."
backup cron path directory tar
  • 2 个回答
  • 260 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve