Reset the root and user password
To reset the root password in LINUX ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
Log on as root directory. 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.
[e2e@localhost ~ ]: $ ssh root@ipaddress
e2e@e2e:- su
e2e@e2e:- su root
- Type the command “passwd” at the root prompt.
root@e2e: # passed
Enter NEW UNIX password:
- Enter your new password and repeat it at the confirmation prompt.
root@e2e: # passed
Enter NEW UNIX password:
Retype NEW UNIX password:
Password updated successfully.
- Logout using the “exit” command.
To change the user password in LINUX
Please follow the below steps:
1.Type the command “passwd” followed by username at the root prompt.
root@e2e: # passwd user
Enter NEW UNIX password:
Please note that “user” must be replaced by your user name . To know your user name, type whoami in the terminal.
- Enter your new password and repeat it at the confirmation prompt.
root@e2e: # passwd user
Enter NEW UNIX password:
Retype NEW UNIX password:
Password updated successfully.