Possible Duplicate:
How do I add a user to the “sudo” group?
I've added myself back into the admin's group I think, by following this.
But I still can't do commands like:
sudo aptitude update
I get the message
oshirowanen is not in the sudoers file. This incident will be reported.
How do I add myself into the sudoers group now that I am in the admin group?
Login as root or
su
to get root prompttype
visudo
an editor will open find a line says
add one with your username below that
Type
ctrl+x
TypeY
to the promptIf you're in the
admin
group (or thesudo
group starting with Ubuntu 12.04) but that group isn't configured in/etc/sudoers
to be able to run commands as root withsudo
, you can fix that problem the same way you'd fix a brokensudoers
file:Then just edit the
sudoers
file to add whatever entries you need. In particular:Ubuntu systems before 12.04, or those that were upgraded from a version before 12.04, should have this:
Ubuntu 12.04 and later should have this (even if they also have the above lines because they were upgraded from an earlier release):
This
pkexec
method works (on desktop systems) because Ubuntu systems with a GUI installed have two separate mechanisms for administrators to perform actions asroot
:sudo
, and PolicyKit.See this question about a different but similar problem, if you're curious and want more information: