wierd sudo problem?

Peter Garrett peter.garrett at optusnet.com.au
Thu Nov 17 02:39:22 UTC 2005


On Wed, 16 Nov 2005 14:16:57 -0500
Matt Price <matt.price at utoronto.ca> wrote:

> hi there,
> 
> one of my students has done somehting wierd on his ubuntu system --
> which I belive is properly instlaled, but can't be entirely sure! --,
> and now the "sudo" command doesn't work.  so e.g., if I type:
> 
> echo "hello"
> 
> that works; if on the other hand I type:
> 
> sudo echo "hello"
> 
> I am asked for my password, but then just returned to the command line
> with no action having been taken.  Since there's no root access on the
> machine, I can't just login and explore what's going on, so I'm pretty
> much at a loss.  Is there anything that might be done in this
> instance?  ANyone have any idea what's going on?  I've never seen
> sudo act this way before, 
> 
> thanks,
> 
> matt

I would try the following:

1) Boot in recovery mode - this should give you a root prompt by default in Ubuntu Hitting <esc> on boot should give you a grub menu from which to choose the option. If it's a dual boot you get it by default, of course.

2) su <username>    to become that user, then type  either  "id"  or "groups"  (without quotes) to see what groups the user is in. He should be in the "admin" group to be allowed sudo rights (on Breezy anyway, and I think on Hoary as well - Warty used a different method)

Actually this step can be done without root access, of course, so you might do it first to check before using recovery mode.

3) If he isn't in the admin group, add him  (  adduser <username> admin )

4) On breezy, the entry in /etc/sudoers should look something like

# Members of the admin group may gain root privileges
%admin  ALL=(ALL) ALL

If not, run " visudo" and insert those lines.

All this is based on the assumption that he has somehow disabled his sudo access. 
Looking at /var/log/auth.log might also give some clues as to what is happening when he attempts to "sudo"

Peter



-- 

Linux User #343161 




More information about the ubuntu-users mailing list