I'm running Ubuntu 11.10. I'm trying to setup a user that's essentially a clone of the permissions of the ubuntu
user. This works but I'm not able to sudo with this new user without supplying a password (which I don't even have for this user). How can I set it up to work the same way as the ubuntu
user?
Here's what I did (I'm doing this over SSH by the way):
I created a new user with:
sudo useradd -d /home/ryan -m ryan
Then I added this user to the admin group with:
sudo usermod -a -G admin ryan
Then I cloned the ssh keys that are setup for the ubuntu
user over to this new user:
sudo mkdir /home/ryan/.ssh
sudo chown ryan:ryan /home/ryan/.ssh
sudo cp /home/ubuntu/.ssh/authorized_keys /home/ryan/.ssh
sudo chown ryan:ryan /home/ryan/.ssh/authorized_keys
I then was able to ssh to the machine as ryan using the key to authenticate me. But when I try to do a sudo commend I get prompted for a password:
ryan@machine:~$ sudo /etc/passwd
[sudo] password for ryan:
How can I bypass this? Basically I want it to work like the ubuntu
user...
sudo passwd ryan