cannot use sudo command

Asked by jatan

hi!! Created this problem myself. using users&groups i took away the 'administer privilege' for my only login name-a1. now i cannot use sudo command and get into root. the error given is " this 'a1' is not in sudoers file. seen the https://help.ubuntu.com/community/Sudoers docs. however, am confused as to how to add it into admin priveleges:

My sudoers file is as :(which is very much like the default sudoers file)
# /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.
#

Defaults env_reset

# Uncomment to allow members of group sudo to not need a password
# %sudo ALL=NOPASSWD: ALL

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root ALL=(ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

please tell me what is to be done

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu sudo Edit question
Assignee:
No assignee Edit question
Solved by:
jatan
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

boot to root recovery console and add your username to the admin group

You can then use sudo as you expect. Your sudoers file is fine,

Revision history for this message
Iowan (iowan) said :
#2

Probably the same information here: http://www.psychocats.net/ubuntu/fixsudo

Revision history for this message
jatan (jatanmistry) said :
#3

Thanks guys!! It works now!!

Revision history for this message
moran60 (mele-more) said :
#4

Excuse me, marco, if i answer only now, I ask how use the informations that appear, after i run the link that gave me. Go in the terminal these terms, in this order?
# /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.
#
what's mean "Defaults env_reset"
How to use these terms(in terminal?)
# Uncomment to allow members of group sudo to not need a password
# %sudo ALL=NOPASSWD: ALL

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root ALL=(ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

I don't know what to do with these informations, because unknown some things, how to use this program. As this answer:
boot to root recovery console and add your username to the admin group
You can then use sudo as you expect. Your sudoers file is fine,

I haven't understood system. What must I understand?
I hope you understand, where I don't arrive, and you can help me, too...