March 29, 2010

How to recover root password with ZFS

Posted in ZFS at 2:21 pm by alessiodini

Today with Gianluca i recovered a root password of a system with ZFS as volume manager.

The procedure is simple and composited by follow steps:

– boot from CDROM or in failsafe mode

– show the available pools to import

zpool import

– identify and import the root pool ( in this case rpool )

zpool import -f -R /tmp/rpool rpool

– configure root dataset as legacy

zfs set mountpoint=legacy rpool/ROOT/solaris

– manually mount it

mount -F zfs rpool/ROOT/solaris /mnt

– change/reset the root password

cd /mnt/etc
vi shadow

for empty password also check the directive PermitEmptyPasswords in /etc/ssh/sshd_config

Remember to reset mountpoint property for root dataset !

Advertisements

4 Comments »

  1. Freddie said,

    what is the default mountpoint property for root dataset and how do I reset it

  2. Kattubava said,

    Thank you

    • alessiodini said,

      thank you for visit my blog ! šŸ™‚


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: