user and group are locked and i can't unlock them?

Asked by terry

it say sudo will not give me permistion to ask my admin but i am the admin any help? this is what it says
 terry is not in the sudoers file. This incident will be reported.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu sudo Edit question
Assignee:
No assignee Edit question
Solved by:
Robert Di Gioia
Solved:
Last query:
Last reply:
Revision history for this message
Best Robert Di Gioia (digioiar) said :
#1

Hi

First, determine if you are in the admin group. To do so, open a terminal (Applications->Accessories->Terminal) and type the following command

groups

The system will list all of the groups that you are a member of, the important one is admin.

If you ARE in the admin group, then there is probably a problem with the /etc/sudoers file. Of course, you can't even look at it if you're not root :). To look at it and fix it, reboot the system into recovery mode (CAREFUL: you are root in recovery mode), and use the command

cat /etc/sudoers

to look at it. To fix it, use the

visudo

command. I recommend that you read the man pages on sudoers and visudo before you start, and the man page on vi if you're not familiar with that editor. The important line for you is:

%admin ALL=(ALL) ALL

After fixing the file, save it, and reboot the system with this command

shutdown -r now

====

If you are NOT part of the admin group, you can re-add yourself. To do so, reboot the system into recovery mode (CAREFUL: you are root in recovery mode), and use the command

adduser terry admin

to re-add yourself to the admin group

After re-adding yourself to the admin group, reboot the system with the command

shutdown -r now

Good luck

Revision history for this message
terry (akaiceman69) said :
#2

Thanks Robert Di Gioia, that solved my question.

Revision history for this message
terry (akaiceman69) said :
#3

thx u now all i need to do is get my world of warcraft to play.