Solaris / OpenSolarisThis forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Solaris 10, Solaris Express Community Edition
Posts: 547
Rep:
A problem with su on OpenSolaris 2008.05
Hi guys.
I created an user for myself and gave it the Primary Administrator role. To my surprise, the user created by the installer can su to root, but my user cannot and the error is:
Quote:
bash-3.2$ su -
Password:
Roles can only be assumed by authorized users
su: Sorry
I usually pfexec bash when I have to do long task with root privileges but would like to know how I should configure the roles so that my user could su. I reviewd the roles given to the two users and they appear to be the same, so I cannot explain this discrepancy an man su gave me no hint.
Distribution: Solaris 10, Solaris Express Community Edition
Posts: 547
Original Poster
Rep:
Thanks Emerson.
By the way, adding my user to the wheel group didn't change this behavior.
I also discovered that the user created by the installer has the role "root" whereas mine has not. I should read more about RBAC because I feel I'm missing many points. In my previous SXDE installation, by the way, the user was created the same way (with the same script) and it did su to root, so something must have changed between SXDE and OpenSolaris 2008.05. I feel like reading the SXDE docs and OpenSolaris docs to track the differences down but now I'm short of time for such task...
Distribution: Solaris 11.4, Oracle Linux, Mint, Ubuntu/WSL
Posts: 9,788
Rep:
Quote:
Originally Posted by crisostomo_enrico
so something must have changed between SXDE and OpenSolaris 2008.05
There are a lot of difference between these distributions. That one you just hit is Solaris Express preserves the traditional root user account while OpenSolaris/Indiana is replacing it by a role, ie an account you can't log in to. Belenix is doing the same, Ubuntu is doing something closer based on sudo.
Instead of "su -" which won't work as you noticed, you should use "pfexec su".
If for some reason you want to revert to root as a regular account, just remove "type=role;" in the root entry of the /etc/user_attr file.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.