extreme password recovery:

- no usable eth interfaces (eh, it's a firewall :)


=> Ok, null-modem cable. minicom 9600/8/N/1


- no knowledge of existing admin/root password

=> doc says: access to bootmgr (bootloader) and boot single user:
bootmgr[1]> boot -s
[blahblah very verbose boot log]
[---!!! annoying error message !!!---]
shell#
=> filesystem is ro, broken spwd.db, nonexistant master.pwd:
# find / -name spwd.db
/image/IPSO-4.1-BUILD028-03.20.2007-015808-1515/etc/spwd.db
# file /image/IPSO-4.1-BUILD028-03.20.2007-015808-1515/etc/spwd.db
/image/IPSO-4.1-BUILD028-03.20.2007-015808-1515/etc/spwd.db: broken symbolic link to ../../../var/etc/spwd.db

=> checkpoint /etc/overpw doesn't work
=> unix pwd_mkdb doesn't work either.


=> rebuild master.pwd and then use pwd_mkdb to recreate /etc/spwd.db ?



# find / -name passwd
/image/IPSO-4.1-BUILD028-03.20.2007-015808-1515/etc/passwd
/image/IPSO-4.1-BUILD028-03.20.2007-015808-1515/rfs_utils/passwd

# file /image/IPSO-4.1-BUILD028-03.20.2007-015808-1515/rfs_utils/passwd
/image/IPSO-4.1-BUILD028-03.20.2007-015808-1515/rfs_utils/passwd: ascii text

# cat /image/IPSO-4.1-BUILD028-03.20.2007-015808-1515/rfs_utils/passwd
root:*:0:0:Charlie &:/:/bin/sh
admin:*:0:10:Admin:/var/emhome/admin:/etc/cli.sh
monitor:*:102:10:Monitor:/var/emhome/monitor:/etc/cli.sh
operator:*:2:20:System &:/nonexistent:/nonexistent
daemon:*:1:31:Owner of many system processes:/root:/nonexistent
bin:*:3:7:Binaries Commands and Source,,,:/:/nonexistent
uucp:*:66:66:UUCP pseudo-user:/nonexistent:/nonexistent
nobody:*:65534:65534:Unprivileged user:/nonexistent:/nonexistent




Enter pathname of shell or RETURN for sh: 
# /etc/overpw
    This program is used to set a temporary admin password when you have 
    lost the configured password.  You must have booted the machine into 
    single user mode to run it.  The configured password will be changed.
    Please change the temporary password as soon as you log on to your
    system through voyager.

Please enter password for user admin: 
Please re-enter password for confirmation: 
Continue? [n] y
Running fsck...
/dev/rwd0f: LINK COUNT DIR I=2  OWNER=0 MODE=40755
/dev/rwd0f: SIZE=512 MTIME=Sep 30 13:16 2008  COUNT 9 SHOULD BE 8 (ADJUSTED)
/dev/rwd0f: CLEAN FLAG NOT SET IN SUPERBLOCK (FIXED)
/dev/rwd0f: 3150 files, 100089 used, 495978 free (1418 frags, 61820 blocks, 0.2% fragmentation)
WARNING: R/W mount of /config denied. Filesystem is not clean - run fsck.
/dev/wd0a on /config: Operation not permitted
WARNING: R/W mount of /var denied. Filesystem is not clean - run fsck.
/dev/wd0d on /var: Operation not permitted
WARNING: R/W mount of /opt denied. Filesystem is not clean - run fsck.
/dev/wd0e on /opt: Operation not permitted

Active file must exist before running /etc/overpw




# /etc/overpw
    This program is used to set a temporary admin password when you have 
    lost the configured password.  You must have booted the machine into 
    single user mode to run it.  The configured password will be changed.
    Please change the temporary password as soon as you log on to your
    system through voyager.

Please enter password for user admin: 
Please re-enter password for confirmation: 
Continue? [n] y
Running fsck...
/dev/rwd0f: clean, 495978 free (1418 frags, 61820 blocks, 0.2% fragmentation)
/dev/rwd0a: clean, 31517 free (29 frags, 3936 blocks, 0.1% fragmentation)
/dev/rwd0d: clean, 28075184 free (1552 frags, 3509204 blocks, 0.0% fragmentation)
/dev/rwd0e: clean, 4538280 free (2480 frags, 566975 blocks, 0.0% fragmentation)

    Admin password changed.  You may enter ^D to continue booting.  
    THIS IS A TEMPORARY PASSWORD CHANGE.
    PLEASE USE VOYAGER TO CREATE A PERMENANT PASSWORD FOR THE USER ADMIN.
#