Help! I screwed up /etc/passwd

Help! I screwed up /etc/passwd

Post by Jonathan P Vielhab » Fri, 22 Apr 1994 13:16:25



I was trying to add a user to the /etc/passwd file. I added the record to my
file (after carefully making a backup of course). I then made the directory,
but forgot to set the password. I logged out (from root) and now I can't log
in again, under anything. Previously I didn't have a password for root since
I was just setting up, but using the root login asks me for one now. Any clues
on how to rebuild the file without reinstalling 55+ disks? BTW, it's the
newest version of Slackware with pretty much all of the disks. Thanks...

Jon Vielhaber

 
 
 

Help! I screwed up /etc/passwd

Post by Grotenhuis » Fri, 22 Apr 1994 21:42:31



: I was trying to add a user to the /etc/passwd file. I added the record to my
: file (after carefully making a backup of course). I then made the directory,
: but forgot to set the password. I logged out (from root) and now I can't log
: in again, under anything. Previously I didn't have a password for root since
: I was just setting up, but using the root login asks me for one now. Any clues
: on how to rebuild the file without reinstalling 55+ disks? BTW, it's the
: newest version of Slackware with pretty much all of the disks. Thanks...

Use your boot & root disks, you will now login as root without a password.
Now you must mount the partition which has /etc on it.
Like: mount -t <filesystem, eg ext2> /dev/<partition> /mnt
After this you go to dir /mnt/etc and either you copy the initial passwd file
from /etc to /mnt/etc or you edit /mnt/etc/passwd and delete the encrypted
password for root (leave the colons) or you copy /mnt/etc/<your_backup> to
/mnt/etc/passwd (I would use the first or third option).
After this you should be able to login as root again.

And it's easier to add a user with 'adduser', this will do everything
for you.

: Jon Vielhaber

Regards, Danny Grotenhuis.

--


 
 
 

1. I really did it now, screwed up /etc/passwd

Hello all.

I modified my /etc/passwd earlier today to modify a persons account on
my linux machine. problem is I made a typo and here is his home
account:

/home/glenn./ where it should be /home/glenn/./

so when i log in as ANYONE, it says cant find directory and boots me
out. i tried logging in single user and when i give my linux password
it cant find the directory and boots me out.

any one willing to answer my plea for help? Thanks!

2. Destination Host Unreachable

3. /etc/passwd file - am I screwed?!

4. SiS IRQ router 96x detection ...

5. Convert NIS passwd back to standard /etc/passwd & /etc/shadow

6. HELP! Lilo is killing me!

7. /etc/passwd & /etc/security/passwd

8. DiamStlth 64Dram & plug&play

9. CDE vs. /etc/passwd, /etc/shadow and /etc/group

10. How to keep consistancy between /etc/passwd and NIS+ passwd table.

11. root passwd and /etc/passwd in linux single mode

12. how to keep the network passwd and /etc/passwd consistence in nis+

13. patch to support non-/etc/passwd passwd files