1845946 Members
3734 Online
110250 Solutions
New Discussion

system operator

 
SOLVED
Go to solution
Eric_68
Advisor

system operator

Hi,

I am new here.
Would you mind answer me this question??

Can I create role only for shutdown and startup???

If yes, how?
If not, have any other way to give someone the privilege to shutdown and startup the server without root privilege.

Thanks a lot!!!

5 REPLIES 5
Patrick Wallek
Honored Contributor
Solution

Re: system operator

Any user can shut down the system via the shutdown command as long as they are set up in the /etc/shutdown.allow file.

See 'man shutdown' for more information.

I'm not sure what you mean by a user for startup. If the machine is powered off, then you just power on the machine and it comes up, no user interaction is required. Or if you use the 'shutdown -r' command to reboot the machine no interaction is required after that.
Michael Tully
Honored Contributor

Re: system operator

Hi and welcome,

There are two ways.

The first and simplest way is to include the user in the /etc/shutdown.allow file. You don't need to special privileges to start a system. If you have access to 'shutdown' you can reboot the system also. Have a look at the man page for shutdown.

# man 1m shutdown

The second and more secure method is to install 'sudo' and then you could add more commands to this list for this user should you choose like being an operator.

Here is the link for 'sudo'
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/sudo-1.6.6/

HTH
Michael
Anyone for a Mutiny ?
A. Clay Stephenson
Acclaimed Contributor

Re: system operator

There are a few ways to do this.
1) You could create a 'shutdown' user with UID = 0 that executes by specfying shutdown as his login shell (or by making an entry in his .profile).
2) Probably better; use sam -r to created a restricted SAM user to shutdowm. Man sam for details.
3) You could install sudo to initiate the shutdown for a user.

You really don't need any special user to start the system. Anyone can simply power the box 'ON' and it should come fully up automatically. I assume that you have no startup processes that require manual intervention.

Having said all this, I should tell you that this is probably a bad idea. How does the user know when it's safe to shutdown a box. Critical processes may be running.
If it ain't broke, I can fix that.
Eric_68
Advisor

Re: system operator

Thank for replying so fast!!!

My situation is if no administrator in the computer lab, only one of out staff in office.

If there is an emergency issue occurs,
then that guy can shutdown the server properly.

So I need to give him the privilege to shutdown the server.

You guys's solutions are wonderful!!!

Thanks!!!
Andre Lemon
Regular Advisor

Re: system operator

Another idea is that you can create a special
user-id that should only be used in a emergency
when you want the system to be shutdown. What
you can do is make a .profile for that user-id
that will execute shutdown procedures upon
that sign-on being used. Of course you would
limit the password and logon to those who would
be expected to use it.


Andre'

I used to have a logon setup for my Operator's
to execute a nightly backup by signing on as
op_back. (This was when i was new to the
HP-UX, now i use crontab).

Good Luck!!