| Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free! |
/etc/passwd change accidentally,
|
Original Message
|
Name: arpit
Date: January 6, 2006 at 21:13:07 Pacific
Subject: /etc/passwd change accidentally,OS: linux debianCPU/Ram: 256 MB |
Comment: i changed my /etc/passwd file accidentally and typed a letter 'q' in it, while in root. after tht i exited frm root, and now i can not login to root becoz of maligning the file. Mine is grub loader....and i tried changing the file while booting..but in vain.. plz help.
Report Offensive Message For Removal
|
|
Response Number 1
|
Name: arpit
Date: January 6, 2006 at 21:53:20 Pacific
|
Reply: (edit)i changed the command line of grub ..and added init=/bin/bash to get root access... and as /etc/passwd is changed its not recognizing root as username.... inspite of showing root@arpit:#/ it is showing something like : I have no name@#/ and it is displaying /etc/passwd file as read only file....and i m not able to change it in vi...its alwez showing some error..plz helpp
Report Offensive Follow Up For Removal
|
|
Response Number 2
|
Name: Dlonra
Date: January 7, 2006 at 17:16:39 Pacific
|
Reply: (edit)some confusion: you A. can? B. can not? run as root? If B., ls -l /etc/passwd* There may be some older backup files to replace /etc/passwd. NOTE: create a copy of passwd before doing anything else. Have you tried "less passwd" to view the file? I do not know debian. It might have a rescue disk. If all else fails and you are not a newbie, download & create a tom's diskette (www.toms.net/rb), boot it and you should be able to repair things. BTW, why were you editing (with vi?) /etc/passwd?
Report Offensive Follow Up For Removal
|
|
Response Number 3
|
Name: 3Dave
Date: January 11, 2006 at 05:04:46 Pacific
|
Reply: (edit)If you have a live linux cd around like knoppix you could use that too. Boot, mount the partition and edit back the file.
Report Offensive Follow Up For Removal
|
|
Response Number 4
|
Name: zerofunk
Date: January 13, 2006 at 10:18:43 Pacific
|
Reply: (edit)See if this helps: http://zwarecreations.com/htpasswd_generator.php It encrypts with crypt(), I have never tried it in this manner though, just a wild thought. Siggy: Always check the manual first, Google helps too.
Report Offensive Follow Up For Removal
|

Post Locked
This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
Go to Linux Forum Home