root password recovery in Solaris 11
当前状态:Solaris 11能够启动,但是无任何user的password。
Action Plan:
用其他的介质启动到single user mode
boot net -s
boot cdrom -s, if it ask username: root/solaris or root/password.
从installation media引导
on x86, you need edit grub and append -s on kernel line.
到了single user mode之后,import rpool
# mkdir -p /a/b
# zpool import -f -R /a rpool
# zfs list
# zfs set mountpoint=/b rpool/ROOT/solaris
# zfs mount rpool/ROOT/solaris
现在root file system会被mount 到/a/b
then edit /a/b/etc/shadow
remove the password section, let it looks likes.
root::15356::::::
如果root user默认不能直接能够登录,你需要注释掉/a/b/etc/user_attr中的下列行目
# vi /a/b/etc/user_attr
注释掉 root::::type=role
# vi /a/b/etc/default/login
注释掉 PASSREQ=YES
don’t forget to reset the mountpoint back
# zfs set mountpoint=/ rpool/ROOT/solaris
# zpool export rpool
# reboot 好文:victory: :em03:收藏 好文,学习,收藏。
页:
[1]