Some basic tasks that will come in handy when using Ubuntu 13.04 are resetting the root password, changing your username, locking and unlocking accounts. These simple tasks can be carried out even if you don’t have access to Ubuntu desktop session. Anyone with the physical machine can carry them out, that’s the scary thing about it.

By default, Ubuntu comes with the root or administrator account disabled. In order to login as root, you must re-enable the account and create a new password to login with. You can also use these tips to reset your forgotten passwords and username in Ubuntu.

To accomplish all of the above tasks, you must sign to Ubuntu Recovery Mode. The Recovery Mode lets you sign into Ubuntu with limited sets of utilities and tools to help you troubleshoot and restore Ubuntu, fix broken packages and repair the boot menu.

The only downside with it is that anyone with physical access to the machine can carry them out without authentication.

To get started, hold down the Shift Key on your keyboard and turn on Ubuntu. When the boot screen comes up, scroll down and select ‘Advanced options for Ubuntu’

 

root_accont_reset

 

Next, select ‘Ubuntu with Recovery Mode’

 

root_accont_reset_1

 

Then scroll down and select ‘root’ to drop into the root shell prompt.

 

root_accont_reset_2

 

When you’re there, run the commands below to remount the root directory with read/write access.

mount -rw -o remount /

 

root_accont_reset_3

 

That’s it! Now you can easily unlock any account, change any password and username, fix packages repair grub and carry out many others tasks from this root shell prompt.

 

To unlock the root account, run the commands below. For other account, replace the root username with the account username.

sudo passwd -u root

 

To create a new password for the root account, run the commands below. For any other account, replace the root with the username of the account.

sudo passwd root

 

To change your username in Ubuntu run the commands below. You can also use the command below to change the root username.

usermod -c "Real Name" -l  New_username   Old_username

 

 

To change your forgetting password, run the commands below. You’ll be prompted to create a confirm a new password.

passwd username

 

To enable root login, so you can login as root, you must enable manual logon from the logon screen in Ubuntu. To do that, run the commands below.

sudo sh -c 'echo "greeter-show-manual-login=true" >> /etc/lightdm/lightdm.conf'

 

or run the commands below to open lightdm.conf file, then add the line highlight below into it and save.

vi /etc/lightdm/lightdm.conf

 

Add the line below into the file and save it. To add the line, type I key on your keyboard. when you’re done adding the line, pres the Esc key. To save it, type :wq characters.

greeter-show-manual-login=true

 

root_accont_reset_4

 

Now on Ubuntu logon screen, use Login, then type root username and password. When you’re done using the recovery mode, type exit

 

That’s it! Enjoy!