LinuxQuestions.org
Review your favorite Linux distribution.
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 222 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 01:39 PM.

Main Menu

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration