Sudo Not Working

Hi,

I'm having trouble getting sudo working correctly on my Ubuntu 7.10 linode.

If I log in as my non-root user and try something like:

sudo nano

I'm prompted for my root password which I enter, and then I'm simply returned to the prompt again (whereas I'd expect nano to open).

To troubleshoot, this is what I then did:

By default there didn't seem to be an admin group, so I added one as root:

addgroup --system admin

I then added my user to the admin group.

useradd -g myusername admin

But sudo still behaves in the same way.

Can anyone help me with this?

Thanks.

2 Replies

1) sudo wants your user's password, not root's password.

2) is you user listed in /etc/sudoers? use visudo to edit. (for more info: man sudoers)

Thanks aaron.

Adding my username to the /etc/sudoers file worked a treat.

Thanks.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct