• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1078
  • Last Modified:

Solaris 10 shutdown for someone else besides root

Trying to set up an account on a new install of Solaris 10 that can shut the machine down from a terminal. I ran the SMC and created a user in the staff group and and gave it "shutdown" rights under the rights tab (there was message on the side bar that said Rtshutdown.html could not be accessed, most likely cause the file doesn't exist). Still got permission denied when I tried to run the shutdown command. I then added the user to the following groups; bin, root, sys, sysadmin, I really don't want the user in those groups, I was just testing stuff out. The user still get permision denied when it tries to run shutdown.

One side note, I did not install and naming services during the install process and this machine does not have access to the internet.

If you need to see some configs just let me know, an help would be great

2 Solutions
delegating the rights to shutdown the system can be done with one of these mentioned above, RBAC or sudo,
but can you give us these outputs to see why a user with root permission is not able to shutdown

#more /etc/passwd
#more /etc/group
echo $PATH     -- from the user's login shell

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

still_lostAuthor Commented:
Should have mentioned this earlier, but I don't want to use sudo.

This is what I've done so far. Using mainly the SMC i've created a user named sentry who's primary group is staff. I created a role called shut gave it the predefined right "shutdown" and a "shutdowncmd" right that I made in the SMC. The shut role is part of the sysadmin group. I added the sentry and root user to the shut role.

If I "su - shut" from root or sentry then run"/usr/sbin/shutdown -h now" I get "Only root can run ..."

cat /etc/passwd

cat /etc/group

cat /etc/user_attr

$PATH for shut does not include /usr/sbin/ but since I'm typing in the whole path for the command I don't think it should matter
I imagine the reason that you have not gotten any further replies is that sudo is the correct option, and you have said that you don't want to use it.

You should rethink your options.

Creating an account that belongs to no one, to do a job as important as shutting down the machine, can create a major security hole.

With sudo, you have logging and know who did the shutdown.  With your method there is no accountability.

Good Luck!
still_lostAuthor Commented:
For various reasons ( I won't go into them) I have to use RBAC. It is plenty secure for what I am using it for. I guess my question really should have been why is RBAC not working on a new install of Solaris 10
If you insist on doing it the hard way, here is a link that describes the whole process;


Good Luck
still_lostAuthor Commented:
OK, finally got back to this. Seems like the big problem was using SMC and the built in shutdown right. When I finally gave up on SMC and used the command line and created new profile to run the shutdown command it worked.

I followed the first example in the last link that arthurjb posted. I'm sure the one posted by awa2008 would have worked as well if I had done everything in the command line. I'm going to try and split the points between the two. Thanks for all the good links.
still_lostAuthor Commented:
One more thing, there is a slight error in the first example. At one point it says to edit the /etc/security/prof_attr file when it should be the /etc/security/exec_attr file
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now