LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > neonsignal
User Name
Password

Notices


Rate this Entry

resetting the root password

Posted 11-05-2011 at 05:36 AM by neonsignal
Updated 11-05-2011 at 05:38 AM by neonsignal

When the root password has been lost, it can be reset as follows.

At the grub menu, select 'e' to edit, and add the parameter 'init=/bin/bash' to the linux line. Then 'ctrl-x' to continue booting. This will start the system into a command shell.

Then remount the filesystem root as writable, so that the password can be changed:
Code:
mount -n -o rw,remount /
Change the password in the usual way, then sync to disk:
Code:
passwd
sync
The filesystem is then remounted as read only:
Code:
mount -n -o ro,remount /
And the system can then be rebooted:
Code:
reboot
Posted in Uncategorized
Views 521 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 04:57 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration