How to change the root password

How to change the root password

Change root password:

There are two kind of things we need to note,

  • Known the existing password, need to change the old one to new password.
  • Forgotten the existing password, need to change the password.

Known existing password :

  • login to the root shell with the existing password
  • type “passwd”
  • it asks for the new password. just give the new password
  • retype the same for verification.

Thats it !…..

Forgotten the root password :

You can log in with single-user mode and create a new root password,

  • Reboot your computer
  • If you are currently set up to log in to X rather than a console, press [Ctrl]-[X] when prompted. It takes to you to the boot: prompt
  • type linux single to enter single-user mode
  • Now you can change the password, type ” passwd root “
  • re-type the password for verification. your root password will be changed
  • type “shutdown -r now” for reboot

Now you can enter the root shell with the new password.

Was this answer helpful?

 Print this Article

Also Read

Install Rar/Unrar centos 6

for 64 bit install unrar centos x64#wget...

How to install IonCube Loaders

How to install ionCube loader: ionCube produces leading tools for PHP source code protection...

How to install ImageMagick

Install ImageMagick: ImageMagick is a software suite to create, edit, and compose bitmap...

Debian asking to insert cdrom to update?

open a terminalsunano /etc/apt/sources.listput a # in front of the line talking bout cd's (or...

Add multiple IPs to a server

For example if you want to add a few IPs from the 111.123.123.1 class: [root@box ~]# cd...