Tuesday, August 28, 2018

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

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...