将服务器从Debian Lenny升级到Squeeze后,dbus和vsftpd的更新出现问题。
我收到以下错误消息(由Google翻译从德语翻译):
dbus (1.2.24-4 + squeeze1) is set up ... adduser: No program called "groupadd" in $ PATH directory listing found. dpkg: error processing dbus (- configure): Subprocess post-installation script returned error exit status 1 vsftpd (2.3.2-3 + squeeze2) is set up ... configured to not write apport reports addgroup: no program named "groupadd" in $ PATH directory listing found. dpkg: error processing vsftpd (- configure): Subprocess post-installation script returned error exit status 1 configured to not write apport reports Errors were encountered while processing: dbus vsftpd E: Sub-process / usr / bin / dpkg returned an error code (1)
在$ PATH中找不到groupadd。 我的pathvariables是:
-bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin: No such file or directory
但是groupadd是/ usr / sbin / groupadd,所以根据PATH它应该被发现。 但回声还显示,找不到文件或目录,但哪一个?
你需要修改你的/ etc / sudoersconfiguration来包含这一行:
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
这是从lenny到挤压sudo的变化。 这个改变不是为了保留你的定制到/ etc / sudoers而做的。
以下是/usr/share/doc/sudo/NEWS.Debian.gz中的条目:
The sudo package is no longer configured using --with-secure-path. Instead, the provided sudoers file now contains a line declaring 'Defaults secure_path=' with the same path content that was previously hard-coded in the binary. A consequence of this change is that if you do not have such a definition in sudoers, the PATH searched for commands by sudo may be empty. Using explicit paths for each command you want to run with sudo will work well enough to allow the sudoers file to be updated with a suitable entry if one is not already present and you choose to not accept the updated version provided by the package.
最后一个错误消息是报告没有这样的目录或文件的名称 – 也就是说,名称为:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
我不知道你是如何结束目录或文件名,但它是。 要设置PATH,通常需要这样做:
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
(如果使用的是Bourne Shell或C Shell,则会有所不同)。
另外,确保你的/ etc / profile包含一个合理的PATH设置; 当sudo -或su -被完成时,这将被设置。
请注意$PATH生成PATHvariables的内容; 命令$PATH=/usr/bin:/bin:/usr/local/bin是一个错误。