Getting to root when the password has been lost
Tom Gillespie
tag at mtunf.ATT.COM
Sat Sep 8 06:56:15 AEST 1990
In article <24411 at adm.BRL.MIL> SCEF0003%WSUVM1.BITNET at cornellc.cit.cornell.edu (James N. Petersen) writes:
>Recently, we had a graduate student leave, after having changed the
>password for root on our UNIX V/3.2.2 system (AT&T UNIX/386). Is there
>any way we can get in and reset the password to a known value?
The following procedure assumes that you have the first disk of the Base System
Package readily available, that your root disk is 0s1 and your /usr disk
is 0s3:
1) shut the machine down -- use the "FACE" system administration menu,
assuming that you have another login which has sysadm privileges
(look in /etc/.useradm)
if not, hit the reset switch and hope for little filesystem damage
2) insert the first disk of the Base System Package and reboot
3) wait for the "Strike ENTER to install the UNIX System on your hard
disk" prompt.
4) Press the <del> key. After a few moments, a # prompt will appear.
5) execute the following:
fsck -y /dev/dsk/0s1
fsck -y /dev/dsk/0s3
mount /dev/dsk/0s1 /mnt
mount /dev/dsk/0s3 /usr <<=== if this fails, do "mkdir /usr"
and try again
PATH=$PATH:/mnt/bin:/mnt/etc:/usr/bin
TERM=at386
6) edit the following files:
/etc/shadow -- delete the password (second filed of the line) for
root
/etc/default/login -- if there is a line that reads PASSREQ=YES,
remove it
7) execute:
umount /dev/dsk/0s3
umount /dev/dsk/0s1
8) hit the reset switch and remove the diskette
9) when the machine comes up, login as root (there should be no password
now) and set a new password (and fiex /etc/default/login, if
desired)
Tom Gillespie
att!mtunf!tag tag at mtunf.att.com
More information about the Comp.unix.internals
mailing list