[ubuntu-za] user not in sudoers

Hannes Coetzee scorpking at scorpking.za.org
Wed Apr 13 21:04:09 UTC 2011


On 13/04/2011 22:48, Charl Wentzel wrote:
> 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
>
>

You might like this as well --> https://help.ubuntu.com/community/RootSudo

Just a note: to add youself to the admin group run adduser youruser 
admin from root as explained above.



More information about the ubuntu-za mailing list