Root user not in sudoers group WHAT HAVE I DONE?!!?

Derek Broughton derek at pointerstop.ca
Thu May 7 18:18:25 UTC 2009


Richard S. Crawford wrote:

> I attempted to add my main user to another group using usermod.
> Suddenly, I find that my root user no longer can access sudo. When I
> try:
> 
> $ sudo <anything>
> 
> I get:
> 
> deguser is not in the sudoers file.  This incident will be reported.
> 
> 
> And just to be clear, deguser is the account I've been using for all
> sudo tasks until now. There is no other user with the appropriate
> permissions.
> 
> What have I done, and how do I fix it?

To answer the first, I'd be reasonably sure you used -g rather than -G (or 
vice versa, I can never remember).  One replaces _all_ groups with the 
argument, and the other appends the argument to the list of groups.  I 
rather serious difference, which is why it pays to use KUser instead of 
usermod.

To fix it, you'll have to reboot into single-user mode, and execute usermod 
directly from root - being sure to add deguser to the "admin" group.
-- 
derek






More information about the kubuntu-users mailing list