Understanding and Fixing sudo

Most Ubuntu users never have a problem here, but sometimes, people who like to experiment break things, especially while learning. This section exists to help you first understand more completely how sudo works and also how to restore sudo access to a specific user when, for some reason, it has ceased to function for that user.

Note

You will usually know a problem has occurred because an error message like this will appear when a user tries to issue a command using sudo:

Click here to view code image

matthew@seymour:~$ sudo shutdown -h now[sudo] password for matthew:matthew is not in the sudoers file. This incident will be reported.

Sometimes, you might not even receive an error message, but the command issued simply ...

Get Ubuntu Unleashed 2015 Edition: Covering 14.10 and 15.04, Tenth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.