Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Root login Ubuntu VM on Azure

Tags:

ubuntu

azure

Installed Ubuntu Server LTS 14.04 from Azure library on Azure VM. Logged in as standard "azureuser" created by Azure with my password. Changed root password:

sudo passwd root

If I try to login as "root":

Access denied

What do I miss? And yes, the password is correct.

like image 370
Wonder Avatar asked Jun 19 '14 18:06

Wonder


2 Answers

by default, Ubuntu disables the root account. Since root is godmode, disabling it means that all of the hackers with automated scripts that try to break the root account are wasting their time.

I highly recommend against this. (There are many reasons, here are some: https://askubuntu.com/questions/16178/why-is-it-bad-to-login-as-root) However, the steps to do so are Over on askubuntu.com

According to that page, to unlock the root account you must execute sudo passwd -u root. To relock the root account, use sudo passwd -l root

To reiterate: this is kinda a bad idea. A better solution would be to create a new user that has unlimited permissions ONLY WITHIN THE SCOPE OF WHAT YOU REQUIRE. Root is godmode; if you screw something up too bad for you. An elevated user for your scope, on the other hand, would only be able to destroy what it has access to...not your entire system.

like image 34
Russell Uhl Avatar answered Sep 19 '22 09:09

Russell Uhl


Just run sudo -s, you will get the root terminal.

like image 187
Ankit Mishra Avatar answered Sep 22 '22 09:09

Ankit Mishra