SCO Unix
Root Password
Adapted from the Unix Discussion Forum: I want to know if there is any command to reset root password in SCO Unix. I'll be very grateful for the help. This are the typical perms on a SCO dubba.. # ls -ld /tcb
If you have any other logins coressponding to these owners
of these files, su to them, rename the dir. recreate the root file,
Else: First you need a SCO boot floppy with a minimal kernal, vi or ed, and mount on it. If you don't already have one, you can use a custom tailored Unix bootdisk for another UNIX (like Linux or FreeBSD) but this may a) not work or b) destroy your filesystem. Boot the SCO from the boot disk and login to the default shell as root. At this point, none of the internal drives should be mounted. Make a subdirectory on the floppy filesystem called recover
or some such.
After the root partition is mounted, it should be trivial to remove the password for the root account from the password table, save, unmount, reboot and remove the boot floppy. Don't try to reset the root password, just clear out the
password field.
I have used a variant of this procedure to regain access to my firewall in similar circumstances. Using a DOS driver for NTFS, much the same effect can be accomplished (with much more work) on an NT system. Variants of this work for any system you can build the appropriate boot disk for. Also, afterwards, keep a spare "recovery" disk like this handy, but guard it well (i.e. a safe). It is not a problem if you have emergency root and boot floppies for your SCO machines - if not, you are stuck. The only way around is to reload your os and reload your ''full'' system backups. The problem lies in the fact that you need the root password to enter maintenance mode. There are two ways to bypass the root password. The first is if the root entry in tcb is corrupt, and secondly if you have root and boot floppies so that you can purposely corrupt roots tcb entry. I am going to assume that you do have a root and boot. Firstly, as you cannot log in as root, power your system off. Load the boot floppy into the drive and power on. When prompted, load the root floppy. At the prompt, check the bootdisk by: # fsck -y /dev/hd0root hd0root is a special device file purely for disaster recovery. Once fsck has finished, mount it # mount /dev/hd0root /mnt change to /mnt/tcb/files/auth/r rename root # mv root root.old
boot the machine. When the machine comes up, sysinit is run from inittab and when it finds a problem with roots account, it starts up in single user mode without a password. When you get control, # cd /tcb/files/auth/r
Don't forget the password! # cd /
But of course, you need your emergency boot and root floppies! I hope that this has been of some help to you. P.S. SCO 5 is a lot easier as you can do it from the install media.
Have a Unix Problem
Unix Books :-
Return to : - Unix System Administration Hints and Tips (c) www.gotothings.com All material on this site is Copyright.
|