Reset Solaris 11 root password x86 sparc

por | 13 septiembre, 2016

setenv network-boot-arguments host-ip=,router-ip=,subnet-mask=,file=

boot net -s failsafe

root/solaris (default password)
As you can see in the configuration file root is a role

Assign the root role to your local account.

# usermod -R root jdoe-local

root@db04:~# cat /etc/user_attr
# The system provided entries are stored in different files
# under "/etc/user_attr.d". They should not be copied to this file.
# Only local changes should be stored in this file.
# This line should be kept in this file or it will be overwritten.
melam::::type=normal;lock_after_retries=no;profiles=System Administrator;roles=root

To change it

root@db04:~# rolemod -K type=normal root


bring the system to OK prompt(Sparc) or BIOS (x86) and boot from cdrom

to accomplish this :

– For sparc ,type at OK prompt(  boot cdrom -s) and login with username/password   : root/solaris

– For x86 Servers: boot from Solaris CD,select  desired “Keyboard” and ” Keyboard Layout” or use default ones, once you reach the “Solaris Installation  menu” , ( select option 3, which is Shell)

you should get now command prompt (x86 or Sparc).

Mostly the pool name for root file system is (rpool),to be sure what pool name is we issue this command:
# zpool import |grep -i pool:

so ,we have two pools ,and the one we need is (rpool),so force importing this pool by:
# zpool  import -f rpool   (to import root pool)

#beadm list


As seen we have one be (boot environment) named solaris

# beadm mount solaris /a   

# vi /a/etc/shadow
make root line to be like (root::123212::::::5) [clear all text between first (:) end second (:),this text is the encrypted password for root]

By default, Solaris doesn’t allow empty password ,the workaround is to disable an option in file (/a/etc/default/login)

# vi /a/etc/default/login

search for (PASSREQ=yes) and change to (PASSREQ=no).

Now, Update bootenvironment by the following command

bootadm update-archive -R /a

– for Sparc servers , issue command  (init 0) , and at OK prompt ( OK  boot)

– for x86 servers:issue command (reboot ), and boot from harddisk

enter login-name as root, the shell will drop you directly to shell without asking fro password.

edit the file (/etc/default/login), change (PASSREQ=no) to (PASSREQ=yes).

set your root password by typing command (passwd) without any option.