07-29-2002
3,093,
36
Join Date: Apr 2002
Last Activity: 28 March 2019, 4:00 PM EDT
Location: On my motorcycle
Posts: 3,093
Thanks Given: 2
Thanked 36 Times in 11 Posts
If you are booting off of cdrom, then / is the last place you want to be. You are mounting the 'problem' disk as a different filesystem. You will want to edit the shadow file in /a/etc, not /etc. Attempting to vi /etc/shadow will do nothing since
1. it's not the one you need
2. a cdrom is read-only.
Do this:
ok boot cdrom -s
Once you are booted with a # prompt -
# mount /dev/dsk/c0t0d0s0 /a
(If c0t0d0s0 is your boot device - if not, change to the appropriate disk)
#cd /a/etc
#TERM=vt100; export TERM
#vi shadow
In the shadow file, remove the second field in the root entry (should be the top one). The fields will be separated by :.
Save the file and then check that it worked by
# head /a/etc/shadow
You should see something like this -
root::11890::35:14:::
daemon:NP:6445::::::
bin:NP:6445::::::
# umount /a
# init 0
ok boot -s
This will boot single user off your disk - it will either send you straight to a # prompt or ask for a password. If it asks for a password, hit return. If you get the # prompt, you did it.
If not, then you didn't
1. follow the steps.
2. edit the correct file or you don't use a shadow file
3. didn't mount the true boot device to /a when booted from cdrom.