Unix and Linux network configuration. Multiple network interfaces. Bridged NICs. High-availability network configurations.


Reviews of latest Unix and Linux software. Helpful tips for application support admins. Automating application support.


Disk partitioning, filesystems, directories, and files. Volume management, logical volumes, HA filesystems. Backups and disaster recovery.


Distributed server monitoring. Server performance and capacity planning. Monitoring applications, network status and user activity.

Commands & Shells

Cool Unix shell commands and options. Command-line tools and application. Things every Unix sysadmin needs to know.

Home » Disaster Recovery

Resetting Root Password under Solaris

Submitted by on November 20, 2005 – 2:02 am 3 Comments

The following document explains how to change an unknown root password on a Solaris system. Use this only for disaster recovery purposes. Please be sure to read the Notes section below if you run into any problems.


1.Physical access to the Solaris machine
2.CD or DVD drive


1.Power-on the system and interrupt the boot sequence with Stop-a
2.Insert the Solaris Installation CD or the Solaris Operating System DVD
3.At the OK prompt type boot cdrom -sw 1
4.Once the system is booted in single-user mode, run format to view the listing of local hard drives.
5.Mount the primary boot disk under a temporary mountpoint:
mount /dev/dsk/c0t0d0s2 /mnt 2
6.Configure display and the text editor:

stty erase
export VISUAL=vi
export TERM=vt100

7.Open the shadow file in the vi editor and remove the password hash for the root account (highlighted in red in the example below). Save the shadow file, exit vi and reboot the system:

vi /mnt/etc/shadow
root::6445:::::: 3


8.Allow the system to bootup normally. Login as root without password. Use passwd command to set a new root password. 4


1.It may be important to use the correct release of the Solaris Installation CD-ROM. Some systems require specific drivers only found in certain releases. For example, a SunBlade 1500 may only boot from Solaris 9 CD or DVD dated 4/04, 9/04 or later. It may not boot from a Solaris 10 DVD dated 3/05, failing with an error: boot: cannot open kernel/sparcv9/unix. Strange but true, so it always helps to keep around a collection of Solaris installation CDs.
2.When booting from CD-ROM, make sure to use boot cdrom -s or boot cdrom -sw (not boot cdrom or boot -s cdrom). This will get you to the OS prompt forgoing the installation routine.
3.If you do boot cdrom -sw, and you have the correct disk in the drive, and the system still doesn’t boot, check the boot device alias: from the OK prompt run devalias and look at the cdrom line. The physical address for the device is rather confusing, but do you best to check whether it makes sense. It probably should have the word cdrom in it.
4.When editing the shadow file, make sure you vi the /mnt/etc/shadow and not the /etc/shadow. This is a simple thing but working under stress does not improve ones attention to detail.

Print Friendly, PDF & Email


  • Smashing Pumpkins says:

    I was wondering if the Nfusion Solaris is working? Any of the channels working at all? If so is there any free sites that have files for it? It’s been down for 6months or so. How can I get it up and running again?

  • David says:

    Hi, someone know which operative system use the CIA, FBI and the government of the US?. In case that is Linux, please tell me the name of the distribution. Thank you!

  • superdork says:

    I create a backup of a Solaris system with ufsdump and the backup spans multiple tapes.

    When I use “ufsrestore isfv # /dev/rmt/0” to recover a file interactively, I am always prompted:

    “Specify next volume #: ”

    What exactly is the volume number? If the backup spans 3 DAT tapes for example, is the volume number the same as the tape number in the backup?

Leave a Reply

%d bloggers like this: