MoonOcean

« Sun Device Detection... | Main | Stand-alone version... »
Wednesday May 21, 2008

Login OpenSolaris 2008.05 as *root* user

When you install the OpenSolaris 2008.05, there is page prompting you to input the root password along with creating a normal user. If you define a normal user at that time, you will find that you are not allowed to login the system with root user. 

What should you do? Re-install the system? It is a solution. But there is a much easier one as follows:

Revise the following line in the file of /etc/user_attr

----------------------

root::::type=role;auths=solaris.*,solaris.grant;profiles=All;lock_after_retries=no;min_label=admin_low;clearance=admin_high 

----------------------

to

----------------------

root::::auths=solaris.*,solaris.grant;profiles=All;lock_after_retries=no;min_label=admin_low;clearance=admin_high

----------------------

And then reboot the system. You can login as root again.

*^^*

 

Comments:

Very useful! Thanks for sharing!

Posted by winnie on May 22, 2008 at 06:05 PM HKT #

How do you edit that file? pfexec vi /etc/user_attr doesn't work.....

Posted by Tom on September 17, 2008 at 10:00 AM HKT #

Use only "vi" for god sake... =) Its unix..

Posted by cyanide on October 11, 2008 at 08:25 PM HKT #

Really useful one..Thanks

Posted by Rengs on December 11, 2008 at 05:33 PM HKT #

Can't see how to edit etc/user_attr to become a member of admin group when I am not yet. Saving the file is not possible... Did I miss sth (am a newby)

Posted by Markus Doppler on December 21, 2008 at 08:23 AM HKT #

Use a terminal as root account. On install you are asked to provide a root password:
1. Open Terminal
2. Type> su
3. Enter root password as entered during install
4. Use vi or gedit (I like graphics so I used gedit)
5. gedit /etc/user_attr
6. Changed the lines as suggested in the blog
7. Save the file and re-boot

Hope this helps

Posted by David Costelloe on January 08, 2009 at 12:25 AM HKT #

Just what was needed. The RBAC stuff is rapidly becoming my worst enemy ;-)
Thanks

Posted by MARK OWENS on March 30, 2009 at 04:46 AM HKT #

Errm....

rolemod -K type=normal root

:)

Posted by owczi on June 04, 2009 at 08:06 PM HKT #

Post a Comment:
  • HTML Syntax: NOT allowed