Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

After upgrading a server from Debian Lenny to Squeeze, I have a problem with the updates of dbus and vsftpd.

I get the following error message (translated from German by Google Translate):

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)

groupadd can't be found in $PATH. My PATH Variable is:

-bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin: No such file or directory

But groupadd is /usr/sbin/groupadd so according to PATH it should be found. But the echo also show that a file or directory could not be found but which one?

share|improve this question
    
What output do you see when you run which adduser? What do you see when you run dpkg -S /usr/sbin/adduser? What do you see if you do an ls -al /usr/sbin/adduser? –  Zoredache Feb 9 '12 at 0:25
    
is this running under sudo? –  stew Feb 9 '12 at 14:20
    
@Zoredache I see /usr/sbin/adduser, adduser: /usr/sbin/adduser and -rwxr-xr-x 1 root root 34458 21. Nov 2010 /usr/sbin/adduser –  Dominik Feb 9 '12 at 22:11
    
@stew sure, I run it as sudo –  Dominik Feb 9 '12 at 22:11
    
Interesting. You have a valid looking path, the files appear to be present. If you do an sudo -i and then run adduser atempuser what happens? –  Zoredache Feb 9 '12 at 22:14
show 1 more comment

2 Answers

you need to modify your /etc/sudoers configuration to contain this line:

Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

This is a change in sudo from lenny to squeeze. This change wasn't made to your sudoers file in order to preserve your customizations to /etc/sudoers.

Here's the entry from /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.
share|improve this answer
    
I have this: Defaults env_reset Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" –  Dominik Feb 11 '12 at 15:38
add comment

The last error message is reporting that there is no such directory or file with that name - that is, with the name of:

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

I don't know how you wound up with that as a directory or filename, but there it is. To set the PATH, you generally want to do this:

export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

(if you are using Bourne Shell or C Shell, this will be different.)

Also, make sure that your /etc/profile contains a reasonable setting of PATH; this is what will be set when a sudo - or su - is done.

Note that $PATH produces the contents of the PATH variable; the command $PATH=/usr/bin:/bin:/usr/local/bin is an error.

share|improve this answer
    
I am not sure this is really his error, and may just have to do with the way he tried to figure out what his path was currently set too. I think he tried to run $PATH as a command to see the current path. –  Zoredache Feb 9 '12 at 0:26
    
Agreed. But I didn't want to leave that last question unanswered. –  Mei Feb 9 '12 at 0:32
    
right, I just typed $PATH to get the PATH variable to see if it includes the path where adduser is located... –  Dominik Feb 9 '12 at 22:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.