Posts

Showing posts with the label User Management

[Level 2] How to solve the problem if you forget user password in OpenSolaris?

If you have a user with root role, and forget the user password. How to solve this problem? Steps as the following: 1. Use CD-ROM to boot.   You can use CD-ROM to boot server first. If you don't have, please download the iso file and burn a new one for yourself. 2. Import pool and mount Boot Environment.   Then you can import the "root disk" pool with the command "zpool import". At the same time, you should import the pool ( use option "-R" ) with alternative root. Ex. # zpool import -R /tmp/rpool rpooliso   When you try to change directory to the sub folder "etc" of "/tmp/rpool", and you will find out that the folder doesnot exist ( int this case, /tmp/rpool/etc ). Why? because when you import the pool, the Boot Environment will not be mounted, and you have to mount it manually. So you can use command "beadm" with "mount" sub-command then assign the "boot environment" and the "mount poi...

[Level 1] Switch between user and role in OpenSolaris.

As we know, when we add a new user during OpenSolaris installation wizards, then installer will switch "root" from user to role. And we cannot login the system with role "root". How can we switch root from user to role, after that, how can we switch back? You can use the command below: 0. how to verify root is user or role: [case 1: root is role] # cat /etc/user_attr | grep ^root; root::::type=role;auths=solaris.*,solaris.grant;profiles=All;lock_after_retries=no;clearance=admin_high;min_label=admin_low [case 2: root is user] # cat /etc/user_attr | grep ^root; root::::type=normal;auths=solaris.*,solaris.grant;profiles=All;lock_after_retries=no;clearance=admin_high;min_label=admin_low 1. Change root from role to user: # rolemod -K type=normal root; 2. Change root from user to role: # usermod -K type=role root; Wish this helps. regards, Stanley Huang