Votes: 0Posted On: May 26, 2017 04:51:29
"Root" user is the default user with all rights. To change the Root password you need to log in as root in the command prompt and run the command "passwd". You can also run the command "su". The su (short for substitute user) command makes it possible to change a login session's owner (i.e., the user who originally created that session by logging on to the system) without the owner having to first log out of that session.
Here is a demonstration of how the Root password can be changed.
1. Linux operating system (Ubuntu, CentOS, Debian etc) - In this case we are working on CentOS 7
2. Root permission
Changing the Root Password
1. Open the Terminal of your operating system. Log in as "root" by typing the command "su".
"su" is usually the simplest and most convenient way to change the ownership of a login session to root or to any other user.
A password prompt will be displayed. Please type in your current password to log in as root.
2. After you have log in as root run the command "passwd". The command line will ask you for a new password. Enter the new password in the command prompt (Note : The password will not be displayed on the screen). After typing in the password you will be prompted to retype the password and your password will be changed.