After a fresh install of 7.10 server my first user can't run sudo. I'm rather new to ubuntu and linux so any help would be great

Asked by hey

I new to Ubuntu and Linux in general. I just installed Ubuntu server 7.10. My first user can't run sudo. For example when I try to run sudo apt-get install some package. I get prompted for my password. I enter the password of my first user and it says I don't have permissions to run sudo.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
tdn (spam-thomasdamgaard) said :
#1

What does the command "id" give you, when run from the user who cannot run sudo?

What does the command "cat /etc/sudoers" give rou, when run from root?

Your /etc/sudoers should contain these three lines:
Defaults !lecture,tty_tickets,!fqdn
root ALL=(ALL) ALL
%admin ALL=(ALL) ALL

The last one means that a user who is a member os the admin group is allowed to use sudo.

If your user is not in the group admin, you can add it to the group with this command:
adduser <username> admin

After this, you should log out and in again and the command "id" should tell you that the user is now a member of "admin". And sudo should work.

Can you help with this problem?

Provide an answer of your own, or ask hey for more information if necessary.

To post a message you must log in.