Operating System - HP-UX
1829616 Members
2460 Online
109992 Solutions
New Discussion

Re: shutdown my hpux with another user

 
SOLVED
Go to solution
david_974
Contributor

shutdown my hpux with another user

Hi,
I have a rx4640 itanium server with hpux 11.23 OS installed.
I want do shutdown to my server with another user that is not root, how i can do this?, what rights my new user need?
I don´t want change the id the new user to 0.

Please help,
Thanks,
David
5 REPLIES 5
inventsekar_1
Respected Contributor

Re: shutdown my hpux with another user

you should add that user to shutdown.allow file

the format of that file is:

system name username
-----------------
hpux11i operator
hpux11i user_abcd
* user_efg
------------------
an asterisk in the system name allows specified users from "any system" to execute the shutdown command.
Be Tomorrow, Today.
Mridul Shrivastava
Honored Contributor
Solution

Re: shutdown my hpux with another user

The best way to allow a user shutdown access is through the /etc/shutdown.allow file.

By default, only the superuser can run shutdown. You can designate other users to run shutdown by listing their user names in the /etc/shutdown.allow file. Do not forget
to add root to the list of users!

See the shutdown(1M) man page for details.

If you want to set it up so that when a specific user signs on, the system automatically shuts down, do the following:

1. Create the user through sam.

2. Edit shutdown.allow file to allow shutdown access to the user.

3. Add the shutdown command in the user's .profile file.
Time has a wonderful way of weeding out the trivial
Darrel Louis
Honored Contributor

Re: shutdown my hpux with another user

You must have permission to shut down an HP-UX system! Obviously,
this command can have serious consequences and is therefore to be used
with caution. It is not a command that everyone should be able to use.
Permission to shut down the system is normally reserved for superusers only. However, there is a mechanism that you can use to assign permission to other users so that they can shut down the system should
the need arise when a superuser is not around. The /etc/shutdown.allow file enables superusers to specify who has
permission to shut down the system in their absence. For details, see the shutdown (1M) manpage.

Darrel
V. Nyga
Honored Contributor

Re: shutdown my hpux with another user

Hi,

is your problem solved? No points are given ...

Note: you have to add root to the file shutdown.allow then, if you want to shutdown with root, too.

Also, you can create an user 'stop' for example and put in his .login file:
cd /
/etc/shutdown -hy 0
logout

So if you login as stop the ws is shutting down.

HTH
Volkmar

P.S.
You has assigned points to 9 of 26 responses to your questions.
You should give a feedback if a reply has solved your problem. This helps us (if you need more informations) and other users who search a solution for the same problem.

See also:
http://forums1.itrc.hp.com/service/forums/helptips.do?#28
*** Say 'Thanks' with Kudos ***
f. halili
Trusted Contributor

Re: shutdown my hpux with another user

1. Create a new user via useradd or sam.
2. vi /etc/shutdown.allow and add the user.


Cheers,
f.halili
derekh