I've messed something up now
Doug
dmcgarrett at optonline.net
Sat Sep 24 04:28:53 UTC 2011
On 09/23/2011 11:54 PM, Knute Johnson wrote:
> I'm getting a message when I try to sudo that I'm not in the sudoers
> file. Any idea what I've done and how to fix it?
>
> Thanks,
>
Did you ever have sudo working? Some distros don't put you into the
sudoers file--you have to do it yourself. To
edit the sudoers file, you should invoke visudo, as root, which checks
to see that you haven't bollixed it up. Just
type visudo, and it will open the file in the editoor. Here's what the
relevant section of the file should look like:
# User privilege specification
root ALL=(ALL) ALL
# Uncomment to allow people in group wheel to run all commands
#%wheel ALL=(ALL) ALL
# Same thing without a password
#%wheel ALL=(ALL) NOPASSWD: ALL
# %users ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
# %users localhost=/sbin/shutdown -h now
name ALL=(ALL) ALL
Where you see "name" above, put in your user name. visudo uses vi
syntax, so check on the vi commands to
save and exit the file. Note: You can read the file with cat, from
root--not from your user permission. If it
looks OK, then there's another problem.
--doug
--
Blessed are the peacemakers...for they shall be shot at from both sides. --A. M. Greeley
More information about the ubuntu-users
mailing list