Syed Jahanzaib Personal Blog to Share Knowledge !

December 2, 2011

Ubuntu Howto change ROOT password after fresh installation


root-password


Howto Recover User Forgotten Password  [ UBUNTU  12.x ]

1. Reboot your ubuntu computer
2. Hold shift during boot to start GRUB menu
3. Highlight your image and press ‘e’ to edit
4. Find the line starting with linux and append init=/bin/bash at the end of that line
5. Press ctrl-x to boot.
6. Type in passwd username
7. Set your password.
8. Type in reboot


2# Howto enable ROOT access in Ubuntu after fresh installation

When you install fresh Ubuntu, you can login via normal user account , & root access is not enabled by default  . In Ubuntu , root ID is created without predefined password, it does not have a password, but it does not have an empty password either , ggrrrrrrr Although you can use sudo command (which is also a kind of failsafe to prevent accidentally execution of unwanted mistakes or commands) to execute any task that requires root access, but still if you are doing some administrative related work, its a bit annoying to use sudo before every command.

To assign/change  root password , use the following command at terminal

sudo passwd root

It will ask you to enter current user password, enter it and then it will ask you to enter new root password two times, enter your desired password. Now you can login to root by

su

It will ask you to enter root password, simply enter password that you set in above step.


… OR …

Alternate method is following …

Use below command to switch to shell world

sudo sh

It will ask you the default current user password, just enter your password and press Enter and you will be presented with # sign.

Now enter this command to change the root password.

passwd root

Now enter your new password for user root twice and now you can login to root by using your newly created password by using . . .

su root

 


 

Regard’s
Syed Jahanzaib

Advertisements

1 Comment »

  1. Thank you. It’s good to have important info like this floating around the internet.

    Like

    Comment by blaineiwood — January 4, 2012 @ 6:22 AM


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: