How To Reset Forgotten Root Password In Linux?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
1. Boot the Linux Server or Desktop into single user mode by appending ‘single’ or ‘1’ or ‘s’ to the kernel boot parameter.
2. After booting into single user mode, remount the file system as read–write mode by running the below command:
# mount –o remount,rw /
3. Now reset the forgotten root password by running the below command:
# passwd
4. Enter a new root password twice and then press Enter to set the new root password.
5. Reboot the system by running the below command:
# reboot