How To Change Root Password In Linux
In Linux and other Unix-like operating systems the user “root” is the system super-user. Similar to the administrator account(s) in Windows, root has complete control over the system. You can change the Root Password in Linux. Follow the simple steps below.
Log on as root. This can be achieved by typing “su” or “su root” at the terminal prompt.
Enter the current root password. Don’t be alarmed if as you type nothing is displayed at the prompt. This is intentional for security reasons.
Type the command “passwd” at the root prompt.
Enter your new password and repeat it at the confirmation prompt.
Logout using the “exit” command.
Some distributions (such as Ubuntu) lack a root account by default. If you are given an error as you try to log in as root this may be the case.
It is very dangerous to stay logged in as root for an extended period of time. Log out immediately after completing this process.