Sudo not working?

Tim Frost timfrost at xtra.co.nz
Fri Nov 4 06:05:27 UTC 2005


The key is the error message "doug : command not allowed", which
indicates that the user doug does not have authority to run the command
via sudo (in this case, the command "validate" is not permitted).

This suggests that the user doug is not properly set up in the sodo
control file /etc/sudoers.  The default breezy install sets up the user
that is created at boot time as a sudo user.  I did an install (of
breezy) using expert mode, rather than the default install.  An expert
install does several things in a different way from the default install.
In particular, it allows you to set a root password, and it doesn't set
up any created users with the required privileges for sudo.  This meant
that I had to edit /etc/sudoers (the edit needs to be done using the
command visudo as root), and add the following line, before I could use
sudo:
	tim     ALL=(ALL) ALL

You probably need an entry for user doug that is similar to mine.

>From my reading about Ubuntu, I suspect that there is a user privileges
setting that we have wrong.  I can't confirm this, as I don't have a
machine to do a test install on for comparison purposes.

Tim

On Thu, 2005-11-03 at 18:03 -0500, GDB-B&W-X.3.9 wrote:
> Okay I did a little more snooping today and checked the auth.log to see 
> if there were any clues there.  Here is a sample of what I found.
> 
> Nov  2 19:47:55 localhost gdm[7495]: (pam_unix) session opened for user 
> doug by (uid=0)
> Nov  2 19:50:45 localhost sudo: (pam_unix) authentication failure; 
> logname= uid=0 euid=0 tty= ruser= rhost=  user=doug
> Nov  2 19:51:41 localhost sudo:     doug : command not allowed ; 
> TTY=unknown ; PWD=/home/doug ; USER=root ; COMMAND=validate
> Nov  2 19:52:21 localhost sudo:     doug : command not allowed ; 
> TTY=unknown ; PWD=/home/doug ; USER=root ; COMMAND=validate
> Nov  2 19:53:11 localhost gdm[8289]: (pam_unix) authentication failure; 
> logname= uid=0 euid=0 tty=:20 ruser= rhost=  user=root
> Nov  2 19:53:57 localhost gdm[8289]: (pam_unix) session opened for user 
> doug by (uid=0)
> Nov  2 19:54:13 localhost sudo:     doug : command not allowed ; 
> TTY=unknown ; PWD=/home/doug ; USER=root ; COMMAND=validate
> 
> I'm not well enough versed in deciphering error codes to know exactly 
> what is happening here, but I can see there was a auth failure, perhaps 
> something to do with the user id?  FYI I was logged in as myself (doug) 
> and tried both through the gui as well as a terminal.  I now have the 
> problem solved using the method I outlined, but I would like to know 
> why sudo didn't work as it should have for future reference.  Thanks
> 
> Just a message from Doug...
> 
> 





More information about the ubuntu-users mailing list