Solaris 11 / perte du mot de passe root

vendredi 19 septembre 2014
par  Jerome ROBERT
popularité : 19%

Here is another way to do it :

1) Boot from the text install DVD (or ISO file if your Solaris 11 installation is in a VM)

2) Make sure you boot into single user mode : at the initial GRUB screen, press Esc, then press ’e’ to edit the Grub command line, add the switch ’-s’ for single-user boot

3) After booting into single-user mode, log in as ’root’, the password is ’solaris’

4) Mount the ZFS root pool. Most HOWTOs recommend creating only the directory /a, this is not enough, you need two directories, we use /a/b in the following example. Also the -f flag (force) is important in the zpool import command.

mkdir -p /a/b zpool import -f -R /a rpool zfs set mountpoint=/b rpool/ROOT/solaris zfs mount rpool/ROOT/solaris 

5) Edit the file /a/b/etc/shadow, you may need to make it writable first. Find the row with root’s entry, it is usually the first. Delete the password hash between the first and second colons, so the line now looks like root::12345:::::: (your number may be different).

6) Edit /a/b/etc/user_attr by commenting out the line root::::type=role. This makes root a "normal user" which is not recommended BTW.

7) Edit /a/b/etc/default/login by commenting out the line PASSREQ=YES. This will ensure that no password is required when logging in as root.

8) Reset the root mountpoint by issuing the commands

zfs set mountpoint=/ rpool/ROOT/solaris zpool export rpool 

The first command will complain about being unable to mount ’a’ because the directory is not empty, cannot remount etc. Ignore this and reboot. You should be able to log in as root without a password.



Dernière mise à jour

mercredi 5 juillet 2017


264 Articles
Aucun album photo
Aucune brève
6 Sites Web
2 Auteurs


59 aujourd’hui
217 hier
531723 depuis le début
2 visiteurs actuellement connectés