1.1 How To: Reset Admin/Root Password
FreeBSD (all versions)
Turn Server off. Hitting the Power Button should start a shutdown cycle.
Hit ESC when the OS starts booting
Choose option 4 to boot into Single User Mode
When asked for a shell, hit enter to default to /bin/sh
Once the machine is booted and you see the hash, type
mount -u /
mount -a
Type passwd to reset the password
Enter new password and confirm it. “pam_chauthok(): error in service module” means that the filesystem is not mounted. Follow step 5 again.
Type reboot or hit the power button again to reboot the machine normally.
Linux (Lilo Loader)
Reboot machine
Hit Esc to get to boot prompt if it doesn’t to it automatically
type: linux single
type: passwd
Enter in and confirm new password
type: sync
type: reboot
Linux (GRUB loader)
Reboot machine
Hit Esc to get to boot prompt if it doesn’t to it automatically
Select the Kernal. Hopefully there is only one or two and the names are descriptive. But any one SHOULD work.
type: e
Select the line that starts with “Kernal”
type: e (again)
Add the letter s (in lower case) to the very end of the line
Hit Enter
type the letter b to start booting
Mount the drives type:
mount -t proc proc /proc
mount -o remount,rw /
type: passwd
Enter in new password and confirm it
type: sync
type: reboot
OS X (All Versions) OS X has two ways to reset the Administrator Password.
Option 1:
Find the computer’s original boot disc. These are system specific. If it’s not available, any OS X retail boot disk will work. The wrong disc will give an error message.
Boot off the disc. Accomplish by holding down the c key during power up.
At the Menu go to: Utilities
Choose “Reset Password”
Enter in new password and confirm
Click on Installer
Choose Quit
Option 2:
Hold Down Apple+S while booting computer
Type: sh /etc/rc
Type: passwd root (if that doesn’t work try admin or administrator instead of root)
Enter in new password and confirm
Type: reboot
Solaris (On Sun Hardware). User Sun Keyboard then press Stop +a to go to ok prompt
You must have the Solaris CDRom to do this. If you do not have physical media, get it here. Note that this download is for Ver10, so may not work on older versions.
Reboot Machine
Hit Stop +A to get to the OK prompt
Type: boot cdrom -s
Once booted off the CDRom, type: mount /dev/disk/c0t0d0s0 /a (those are Zeros)
Type: vi /a/etc/shadow
Use the h,j,k,l keys to move around in vi (or go here for more commands)
On the second line, which says root:<bunch of random letters/numbers> type: dd
Type: :wq! to save and quit out of vi
Type: umount /a
Type: boot ok -s (to boot into single user mode)
Type: passwd
Enter in new password and confirm it
Type: reboot
Note that many Solaris systems may have mirrored volumes, a volume manager or other method of copying the full filesystem. If this is the case these instructions will need to be followed for both volumes, otherwise corruption can easily occur.
Solaris (i386/Intel Hardware)
Again you should have the CDRomto boot off of.
Reboot Computer
Enter Bios and Change Boot Order to CDRom first if needed
Boot Computer
On Boot Menu choose Single User mode, which is Option 6 on Solaris 10
Choose Yes when asked to mount the root filesystem
If you choose “No” it can still be mounted with the same command, /dev/disk/c0t0d0s0 /a (those are Zeros)
Type: vi /a/etc/shadow
Use the h,j,k,l keys to move around in vi (or go here for more commands)
On the second line, which says root:<bunch of random letters/numbers> type: dd (to delete whole line)
Type: :wq! to save and quit out of vi
Typ: cd /
Type: umount /a
Type: init s
At password prompt hit enter key
Type: passwd root
Enter in new password and confirm it
Type: reboot
Comments