Thursday, 14 February 2019

Set password for root on virtualbox ubuntu


I loaded ubuntu into virtualbox. It all works well but it occurred to me that I was not asked (or did not setup) a root password. I want to use root on occasion, but I cannot seem to find out how to do this. I've tried to access the sudoers file as well as run visudo but have no authority without root!


Any ideas how to get or setup root password?


I do have a root user in /etc/passwd. The two accounts I have do not have authority to even manage groups, because it asks for root password and I don't know it!



Answer



Ubuntu uses sudo by default. If you preface your command with "sudo" it prompts for your user password and then runs it as root. To get a root session use:


sudo -i

To enable the root account, open a terminal and run the following to set a root password:


sudo passwd root

For more information see:



https://help.ubuntu.com/community/RootSudo



No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...