• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Ubuntu 16.04 sudo problem

SimonMac

TykeLike
Joined
Aug 27, 2010
Messages
24,897
Likes received
5,244
Thanks received
1,850
Location
God's Own Republic Of Yorkshire
I created a VM running Ubuntu 16.04 the user has never had a password, it's was setup using an SSH key and as far as I remember has always worked fine, however when i run any sudo commands it's asking for a password, obviously I've never set one so couldn't begin to imagine what it will be.

Any idea what's going on?
 
I created a VM running Ubuntu 16.04 the user has never had a password, it's was setup using an SSH key and as far as I remember has always worked fine, however when i run any sudo commands it's asking for a password, obviously I've never set one so couldn't begin to imagine what it will be.

Any idea what's going on?

Is is asking for the Root password?
Is the user in the sudoers group?
 
I created a VM running Ubuntu 16.04 the user has never had a password, it's was setup using an SSH key and as far as I remember has always worked fine, however when i run any sudo commands it's asking for a password, obviously I've never set one so couldn't begin to imagine what it will be.

Any idea what's going on?



Can you logon to the VM as root and reset the user's password? If not then you're a bit scuppered short of mounting the VM disk onto another VM and editing the /etc/passwd and/or the /etc/shadow file manually.

Or have a read of this..
ubuntu - Creating an user without a password - Unix & Linux Stack Exchange
 
Is is asking for the Root password?
Is the user in the sudoers group?

It's asking for the password for the user I created.

Boot into recovery mode, reset the root password, then su to root and change the user password?

It's an azure VM so I can send some commands from the console which seem to work as root, will try using that to set the password of the account
 
It's asking for the password for the user I created.



It's an azure VM so I can send some commands from the console which seem to work as root, will try using that to set the password of the account

you can reset the master password of the VM with Azure.
There's a 'reset password' panel under Support + Troubleshooting.
That'll do the job.
 

Advertisers

Back
Top