Operating System - HP-UX
1830468 Members
2544 Online
110005 Solutions
New Discussion

Create permisson to normal users to reboot machine

 
Joyce S. Solomon_1
Occasional Advisor

Create permisson to normal users to reboot machine

Hi All,

Please help.
How do i set an option to a normal user say A in group users to be able to for shutdown and reboot a hp-ux workstation.
I need to give him/her only this access besides all permission given when they are grouped as a normal user.

Thanks

Regards
Joyce

8 REPLIES 8
T G Manikandan
Honored Contributor

Re: Create permisson to normal users to reboot machine

Hello,
If you are trying to provide root permissions to normal users,the tool sudo can be used.
http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/sudo-1.6.2b1/
Try downloading the tool.
You have various questions reg sudo in the forums site.Just give a search for sudo.

Thanks
G Manikandan
Patrick Wallek
Honored Contributor

Re: Create permisson to normal users to reboot machine

Check out the /etc/shutdown.allow file. You can specify the user allowed to shutdown the system in this file.
Stefan Schulz
Honored Contributor

Re: Create permisson to normal users to reboot machine

Hi,

just put the user in the file /etc/shutdown.allow in the form:

user hostname

Make sure you also put the user root in this file. If shutdown.allow exists then automatically all users not mentioned are not allowed to shutdown the system. This means also root.

Hope this helps

Regards Stefan
No Mouse found. System halted. Press Mousebutton to continue.
Michael Tully
Honored Contributor

Re: Create permisson to normal users to reboot machine

Hi,

There are basically two ways that you can
allow users to shutdown a server. You can
include their user id in the shutdown.allow
file, or set up 'sudo' to do it. You can
also set up 'sudo' to other things as well.

HTH
-Michael
Anyone for a Mutiny ?
Bill McNAMARA_1
Honored Contributor

Re: Create permisson to normal users to reboot machine

As the guys said, shutdown.allow will do what you want, but you could also give them a little more access to root tasks with one of two tools:

sam -r
(restricted sam, create the profile for the user.)

scm
service control manager, distributed system administration. See http://www.hp.com/go/servicecontrol
Free downld, available/intagratable linux.

Later,
Bill
It works for me (tm)
Joseph Chakkery
Valued Contributor

Re: Create permisson to normal users to reboot machine

Hi Solomon,

I will agree with what Bill suggests.

sam -r is a good option give only shotdown access to the user.Adding exec /usr/sbin/sam as the last line of users .profile will make sure the user can do only the shutdown procedure.

Regards
Joe.
Knowledge is wealth
Joyce S. Solomon_1
Occasional Advisor

Re: Create permisson to normal users to reboot machine

Hi all,

i have put in the information below to the shutdown.allow file at /etc

*******
optivity root
optivity ops

********

where optivity is the hostname
but i received this message when i type shutdown at command line

Must be super-user to shutdown system into state S -- exiting shutdown.

Please help

regards
Joyce
Santosh Nair_1
Honored Contributor

Re: Create permisson to normal users to reboot machine

Are you trying to reboot the machine or take the machine to Single user. if the later, then it will not work. From the shutdown(1m) man page:

This file does not affect authorization to bring the system down to single-user state for maintenance purposes; that operation is permitted only when invoked by a superuser.

If you need to transition to a different run-level as a normal user, you would probably have to use something like sudo.

Hope this helps.

-Santosh
Life is what's happening while you're busy making other plans