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-140864

dafydd's questions

Martin Hope
dafydd
Asked: 2012-11-30 16:43:33 +0800 CST

Ganglia 网络生成“错误收集 Ganglia 数据 (:):fsockopen 错误”

  • 0

现在,我正在尝试安装一个新的 ganglia-web 界面来替换旧的。谷歌搜索错误给了我很多帮助,但没有任何帮助。我注意到一个很大的区别是 Google 通常会There was an error collecting ganglia data (127.0.0.1:8642): fsockopen error:在我的错误不包括 IP 地址或端口号的情况下返回“”。

唯一符合我的错误的实质性结果是我应该检查 conf.php,但该文件并不明显。

我错过了什么?

redhat
  • 1 个回答
  • 1686 Views
Martin Hope
dafydd
Asked: 2012-11-01 14:23:51 +0800 CST

通过 ldap 对 sudoers 进行故障排除

  • 2

好消息是我在 Red Hat Directory Server 上通过 ldap 获得了 sudoers 。该软件包是 sudo-1.7.2p1。我在一个名为 wheel 的 LDAP 组中有一些 LDAP/Kerberos 用户,我在 LDAP 中有这个条目:

# %wheel, SUDOers, example.com
dn: cn=%wheel,ou=SUDOers,dc=example,dc=com
cn: %wheel
description: Members of group wheel have access to all privileges.
objectClass: sudoRole
objectClass: top
sudoCommand: ALL
sudoHost: ALL
sudoUser: %wheel

因此,wheel 组的成员通过 sudo 具有管理权限。这已经过测试并且工作正常。现在,我设置了另一个 sudo 权限,以允许名为 Administrators 的组的成员以这些命令的非 root 所有者的身份执行两个命令。

# %Administrators, SUDOers, example.com
dn: cn=%Administrators,ou=SUDOers,dc=example,dc=com
sudoRunAsGroup: appGroup
sudoRunAsUser: appOwner
cn: %Administrators
description: Allow members of the group Administrators to run various commands
 .
objectClass: sudoRole
objectClass: top
sudoCommand: appStop
sudoCommand: appStart
sudoCommand: /path/to/appStop
sudoCommand: /path/to/appStart
sudoUser: %Administrators

不幸的是,管理员成员仍然被拒绝运行 appStart 或 appStop 的权限:

-bash-3.2$ sudo /path/to/appStop
[sudo] password for Aaron:
Sorry, user Aaron is not allowed to execute '/path/to/appStop' as root on host.example.com.

-bash-3.2$ sudo -u appOwner /path/to/appStop
[sudo] password for Aaron:
Sorry, user Aaron is not allowed to execute '/path/to/appStop' as appOwner on host.example.com.

/var/log/secure向我展示了两次尝试的这两组消息:

Oct 31 15:02:36 host sudo: pam_unix(sudo:auth): authentication failure; logname=Aaron uid=0 euid=0 tty=/dev/pts/3 ruser= rhost=  user=Aaron
Oct 31 15:02:37 host sudo: pam_krb5[1508]: TGT verified using key for 'host/[email protected]'
Oct 31 15:02:37 host sudo: pam_krb5[1508]: authentication succeeds for 'Aaron' ([email protected])
Oct 31 15:02:37 host sudo:    Aaron : command not allowed ; TTY=pts/3 ; PWD=/auto/home/Aaron ; USER=root ; COMMAND=/path/to/appStop

Oct 31 15:02:52 host sudo: pam_unix(sudo:auth): authentication failure; logname=Aaron uid=0 euid=0 tty=/dev/pts/3 ruser= rhost=  user=Aaron
Oct 31 15:02:52 host sudo: pam_krb5[1547]: TGT verified using key for 'host/[email protected]'
Oct 31 15:02:52 host sudo: pam_krb5[1547]: authentication succeeds for 'Aaron' ([email protected])
Oct 31 15:02:52 host sudo:    Aaron : command not allowed ; TTY=pts/3 ; PWD=/auto/home/Aaron ; USER=appOwner; COMMAND=/path/to/appStop

问题:

  • sudo 是否有某种详细或调试模式,我可以在其中实际看到它捕获 sudoers 权限列表并确定 Aaron 是否应该有运行此命令的权限?(这个问题可能与 sudoers 数据库的保存位置无关。)
  • sudo 是否与某些可能具有我可以打开的日志级别的后台机制一起工作?

现在,我无法解决我无法识别的问题。这是 LDAP 搜索失败吗?这是群成员匹配失败?确定命令失败的原因将帮助我确定修复...

下一步:在 /etc/sudoers 中重新创建权限,并查看它是否在本地工作...

干杯!

ldap
  • 2 个回答
  • 12875 Views
Martin Hope
dafydd
Asked: 2012-10-25 15:31:10 +0800 CST

ntpdate 有效,但 ntpd 无法同步

  • 5

这是在 RHEL 5.5 中。

首先,远程主机的 ntpdate 有效:

$ ntpdate XXX.YYY.4.21
24 Oct 16:01:17 ntpdate[5276]: adjust time server XXX.YYY.4.21 offset 0.027291 sec

其次,这是我的 /etc/ntp.conf 中的服务器行。所有restrict行都已被注释掉以进行故障排除。

server 127.127.1.0
server XXX.YYY.4.21

我执行service ntpd start并检查ntpq:

$ ntpq
ntpq> peer
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*LOCAL(0)        .LOCL.           5 l   36   64  377    0.000    0.000   0.001
 timeserver.doma .LOCL.           1 u   39  128  377    0.489   51.261  58.975

ntpq> opeer
 remote           local          st t when poll reach   delay   offset    disp
==============================================================================
*LOCAL(0)        127.0.0.1        5 l   40   64  377    0.000    0.000   0.001
 timeserver.doma XXX.YYY.22.169   1 u   43  128  377    0.489   51.261  58.975

XXX.YYY.22.169 是我正在使用的主机的地址。对我的 ntp.conf 文件中的 IP 地址进行反向查找可验证 ntpq 输出是否正确命名了远程服务器。但是,如您所见,它似乎只是转入我的 .LOCL。时间服务器。此外,ntptrace只返回本地时间服务器,并ntptrace XXX.YYY.4.21超时。

$ ntptrace
localhost.localdomain: stratum 6, offset 0.000000, synch distance 0.948181

$ ntptrace XXX.YYY.4.21
XXX.YYY.4.21: timed out, nothing received
***Request timed out

这看起来像我的 ntp 守护进程只是在查询自己。

我正在考虑我的测试网络时间服务器和公司网络时间服务器之间的我不控制的路由器在源端口上阻塞的可能性。(我认为 ntpdate 在端口 123 上发送,它绕过了那个过滤器,这就是为什么我不能在 ntpd 运行时使用它的原因。)我已经给网络人员发了电子邮件来检查它。

最后,telnet XXX.YYY.4.21 123永远不要超时或完成连接。

问题:

我在这里错过了什么?

我还可以检查什么来尝试找出此连接失败的位置?

会strace ntptrace XXX.YYY.4.21告诉我 ntptrace 发送的源端口吗?我可以解构大多数 strace 调用,但我无法弄清楚该数据的位置。

如果我不能直接检查我的测试网络和时间服务器之间的网关路由器,我如何建立证据证明它对这些断开连接负责?或者,我如何排除它?

rhel5
  • 5 个回答
  • 18011 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