The Cause
When I was playing around with the Users and Groups, I went ahead and checked every single box. I mean, why not, I want full access, right? Nevermind that looking back I realize that some specifically say not to add them to users.
The Symptoms
I had basic user rights, but no root rights. I could not login as root, su to root, pfexec as root, save files owned by root, reboot the system, anything.
The Clue
Looking at /etc/user_attr, I noticed that while I did have the role=root attached to my name, there was a lot of garbage (read: all those checkmarks listed as profiles) before it. Maybe 256 characters, maybe 512, I didn't honestly count.
I logged into the 2008.05 livecd and saw that jack only had Primary Administrator. Ok, I'll duplicate that. Unfortunately, I couldn't find the real /etc directory in order to just rewrite it as jack.
Since I didn't have root access, I couldn't change the file.
The Solution
- Reboot
- At the GRUB prompt, hit e for edit
- Arrow down to the kernel$ line
- Hit e to edit
- Append -s to the end of the line and hit enter
- Hit b to start booting
- When prompted, type in the root password
- vi /etc/user_attr and remove all profiles except Primary Administrator from my account
- save the file, exit to the prompt, hit ctrl-D to exit single-user mode
Glad I could help :)
ReplyDeleteThanks for your help, I ran into the same problem by checking all the boxes. Fixed it by logging back in as jack and changing my user privileges to primary admin. Thank you!
ReplyDeleteGlad it helped!
ReplyDeleteIt must be helpful ,I believe!
ReplyDeleteOn my work box I ran into a weird situation that whenever I edited it via the users-admin gui, the user_attr file would be edited but it wouldn't persist to the next time I launched the gui.
ReplyDeleteWhat I finally did was go into single user mode, edit the user_attr file AND add staff to sudoers, reboot and run users-admin via the root account there... I dunno - I'm very uncomfortable with it not being consistent. Right now, it works fine as long as I don't edit it.
When using OpenSolaris 2008 11 (and probably newer), make sure to choose the text boot option in GRUB, otherwise the animated progress bar will display forever instead of showing you the command prompt.
ReplyDeleteI just did a fresh install into xVM and it did appear that way for awhile before finally going into the login screen.
ReplyDeleteIf you are finding that to be a problem, you can temporarily delete the colors and splashimage from the boot as well as the graphics on the kernel line and see if it is giving an error during the boot.
thanks for the write up on resolving this. I just did the exact same thing you did. Appreciate you sharing the knowledge.
ReplyDeleteRegards
Tim
I have the same problem that edits via the users-admin GUI don't persist the next time I launch the GUI. I will try editing the /etc/user/attr file manually. Thanks for the hint.
ReplyDeleteThere is an easier way: http://blogs.sun.com/observatory/entry/understading_rbac
ReplyDeleteusermod -R root myusername
Thanks for the information. I was having this problem on MilaX 0.4
ReplyDeleteglad it could help =)
ReplyDeletequickly solved my problem. thank you sir!
ReplyDeleteno problem! glad it helped!
ReplyDeleteExcuse me... How can i get in GRUB prompt in sparc machine?
ReplyDeleteIt would probably depend on how you installed the bootloader. I don't have a sparc machine to test again. Maybe something on one of these pages will help:
Deletehttp://docs.oracle.com/cd/E19253-01/819-5461/6n7ht6r22/index.html
http://docs.oracle.com/cd/E19253-01/821-0441/grub-1/index.html