[ubuntu-za] user not in sudoers

Charl Wentzel charl.wentzel at vodamail.co.za
Wed Apr 13 20:48:43 UTC 2011


On Wed, 2011-04-13 at 21:40 +0200, Johan Scheepers wrote:
> Now this sudo term. When I use sudo for a root command it tells me I am 
> not in the sudoers file.
> 
> This is annoying. How do I get myself (user) in the sudoers file.
> This is at home and I am the only user.
> 

To be able to use sudo you must be part of the admin group.  To add
yourself to this group you'll need to use sudo...  Oh wait, that's a
catch 22 situation! :-(

The first user (ie. the one you create during installation) is always
added to the admin group by default.  I'm guessing your created a new
user for yourself (which by default is not added to the admin group).
Login as the first user and use sudo to add your new user to the admin
group.

It would be unlikely that you're having this problem with your first
user.  However, should that be the case, you can still fix it.  

a. Boot with the installation CD and select "repair a broken system".  

b. Go through the installation steps as usual, don't worry its not going
to reinstall Ubuntu, this is just basic config necessary to run the
recue system.

c. When prompted mount the root file system on your hard disk where
Ubuntu is installed.  You will then be given a command prompt where you
are already logged in as the root user.

d. Now add your user to the admin group (without the need for sudo)

e. Exit the command prompt and reboot normally.

Hope this helps

Regards
Charl




More information about the ubuntu-za mailing list