Quote:
Konsole says this every time you enter anything.
thomas@thomas:~$ sudo apt-get upgrade
sudo: unable to resolve host thomas
|
You may have lost your superuser (sudo) status.
Copied from
http://ubuntuforums.org/archive/index.php/t-150021.html :
"Use the 'Recovery Mode from the Grub menu at startup.
Recovery mode will drop you to a root prompt. If you don't see the GRUB menu at startup then you probably have to press the ESC key to view it, as its sometimes hidden and only revealed when you hit the ESC key.
Once at the root prompt you can use this command to edit the /etc/sudoers file..
visudo #this command does on thing. It opens the sudoers file for editing
My sudoers file looks like this. Note the last line where I give my user sudo privileges. This is the line that would need to be added by those who, for whatever reason, don't have sudo privileges.
# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#
# Host alias specification
# User alias specification
# Cmnd alias specification
# Defaults
Defaults !lecture,tty_tickets,!fqdn
# User privilege specification
root ALL=(ALL) ALL
mustard ALL=(ALL) ALL
You can see my username on the bottom line. You would need to add your username to the bottom as I have done.
Assuming your user name was "bob'', then the line that would need to be added would be..
bob ALL=(ALL) ALL
This is just one way of doing it. Some sudoers files are set up with an admin group called 'adm'. Users are then added to the adm group, and a line in the sudoers file that looks like this below gives members of the 'adm' group admin access.
%adm ALL=(ALL) ALL
If you decided to do it this way you would create the line above at the bottom of your sudoers file then do this command (substituting your username in the appropriate place)..
adduser your_username adm"