DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Sudo Problems

  • submit to reddit
        If you're adding/removing yourself from a group in Linux, you may find yourself in this situation when you try to run <b>sudo</b>: 

$ sudo aptitude remove <program>
<user> is not in the sudoers file.  This incident will be reported.

Reported?  To whom?  

To spite Big Brother, run these commands: 

$ su root
$ usermod -a -G admin <user>

You're now added to the <b>admin</b> group and have <b>sudo</b> rights again.

<a href="">Add User to Group</a>