Computing.Net > Forums > Linux > /etc/passwd change accidentally,

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

/etc/passwd change accidentally,

Reply to Message Icon

Name: arpit
Date: January 6, 2006 at 21:13:07 Pacific
OS: linux debian
CPU/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.



Sponsored Link
Ads by Google

Response Number 1
Name: arpit
Date: January 6, 2006 at 21:53:20 Pacific
Reply:

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


0

Response Number 2
Name: Dlonra
Date: January 7, 2006 at 17:16:39 Pacific
Reply:

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?


0

Response Number 3
Name: 3Dave
Date: January 11, 2006 at 05:04:46 Pacific
Reply:

If you have a live linux cd around like knoppix you could use that too. Boot, mount the partition and edit back the file.


0

Response Number 4
Name: zerofunk
Date: January 13, 2006 at 10:18:43 Pacific
Reply:

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.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Can't start qmail-smtpd TOP does not show second ...



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


Sponsored links

Ads by Google


Results for: /etc/passwd change accidentally,

Bypassing /etc/passwd shell assign. www.computing.net/answers/linux/bypassing-etcpasswd-shell-assign/23467.html

how to recover /etc/passwd? www.computing.net/answers/linux/how-to-recover-etcpasswd/14801.html

editing /etc/passwd www.computing.net/answers/linux/editing-etcpasswd/18853.html