Solved

Lost root passwd

Posted on 1999-01-20
6
317 Views
Last Modified: 2010-04-20
What will you do if you forgot your ROOT PASSWD?
I've mounted the PASSWD file but it is in read-only mode.
 
0
Comment
Question by:rsable
  • 2
  • 2
  • 2
6 Comments
 
LVL 10

Expert Comment

by:rbr
ID: 1639181
How did you mount the password file?
To remove the root password to the following.

Boot Linux from disc and enter with root (not password needed). Mount the drive where the system is on. Enter the etc directory and edit the file passwd. Clear the password entry for root. Reboot your system.
0
 

Author Comment

by:rsable
ID: 1639182
I tried booting using the disc after that happened, i mounted the passwd using  mount <dev> <file/directory>, but i can't find a way to edit the passwd file -- pico, edit and joe didn't work.Is there another way I can't modify the passwd file?  is there an  equivalent function that works like edit or pico?
0
 
LVL 2

Accepted Solution

by:
wqclatre earned 100 total points
ID: 1639183
Start linux in singel user mode by typing
linux single
or linux 1

at the lilo prompt.
You don't need any password to start in single user mode.
Then just change youre password with passwd.
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 2

Expert Comment

by:wqclatre
ID: 1639184
You can also try this:
1. boot from floppy
2. mount youre / partition on /mnt
3. Use chroot to change / to /mnt
4. Try vi or pico or some other editor now.


0
 
LVL 10

Expert Comment

by:rbr
ID: 1639185
Use vi!

0
 

Author Comment

by:rsable
ID: 1639186
thanks....salamat!
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now