How do I fix a corrupted passwd file If you end up with a corrupted password file and root cannot log in, one method for fixing this is to boot the mini-root portion of the installation media (either tape or CD), mount the disk root partition as a temporary file system and edit or copy the backup password file to passwd. After booting the mini-root and entering 1 for INSTALL, the next thing to do is hit 'q' to get to the '#' prompt. You'll need to create a mount point (directory name), e.g., /mnt, and the /dev entries for the raw and character disk devices. You'll also need to make nodes for the devices and mount the disk root partition. Here are the steps: # mkdir /mnt /* create /mnt directory */ # mkdir /dev/dsk /* create block device directory */ # mkdir /dev/rdsk /* create char device directory */ # devcfg /* get major/minor numbers for disk */ # mknod /dev/dsk/0s0 b maj# min# /* make node for the block device */ # mknod /dev/rdsk/0s0 c maj# min# /* make node for the char device */ /* USE NUMBERS RETURNED BY devcfg! */ # /etc/fs/ufs/mount /dev/dsk/0s0 /mnt /* mount the device on /mnt */ [NOTE: The mount command is found under /etc/fs/ufs, /etc/fs/xfs, and /etc/fs/sfs, depending on file system type. However, because most root partitions are in UFS file systems, this is how it is shown here.] You have now mounted the disk root partition on /mnt. The corrupted passwd file is in /mnt/etc (NOT /etc), so change to that directory, and verify that you have an old password file: # cd /mnt/etc # ls -l *pass* -r-------- 1 0 3 1978 Jan 8 10:07 opasswd -rw-r--r-- 1 0 0 2041 May 1 16:29 passwd You might have passwd.old or passwd.bak instead of opasswd. The important thing to note is that you should have a good copy of the password file on line. Now, here's where it gets tricky. There's no vi (text editor) or cp (copy) command. What you need to do is cat the files, redirecting the output: # cat passwd > passwd.bad # cat opasswd > passwd This lists the contents of passwd into passwd.bad, and then overwrites passwd with the contents of opasswd. If you don't have a valid backup passwd file, you can use the ed text editor to create one from scratch. The most important entry is: root::0:3:0000-Admin(0000):/:/sbin/sh You can also use cat: # cat > passwd root::0:3:0000-Admin(0000):/:/sbin/sh d This creates a root login, which should be enough for you to log in and get a good backup off tape.