Operating System - HP-UX
1748007 Members
4285 Online
108757 Solutions
New Discussion юеВ

Re: Create user with option can shutdown HP-UX only

 
mardimarijo
Occasional Advisor

Create user with option can shutdown HP-UX only

Hi, i'm new to administration of HP-UX. I wan to create a user who able to shutdown the HP-UX machine but this user not have ability same as root. Please advise me. Thanks.
19 REPLIES 19
Hakki Aydin Ucar
Honored Contributor

Re: Create user with option can shutdown HP-UX only

/etc/shutdown.allow

it is good for you. put user you want him/her to allow to do that.
V. Nyga
Honored Contributor

Re: Create user with option can shutdown HP-UX only

Hi,

yes insert '+ ' in /etc/shutdown.allow.
You have to add root too, then ('+ root')

Volkmar
*** Say 'Thanks' with Kudos ***
mardimarijo
Occasional Advisor

Re: Create user with option can shutdown HP-UX only

Thanks to Hakki and Volkmar. 1 more question, why must have to add root too, then ('+ root'). Can give me example how to do it.

Thanks again.
V. Nyga
Honored Contributor

Re: Create user with option can shutdown HP-UX only

Hi again,

well, for my ws with 11.11, that's my experience.
As soon as you add one non-root user to /etc/shutdown.allow you're no longer allowed to shutdown as root.
So just add a second line.
This is my /etc/shutdown.allow:
+ stop
+ root

Just two lines ...

HTH
Volkmar
*** Say 'Thanks' with Kudos ***
mardimarijo
Occasional Advisor

Re: Create user with option can shutdown HP-UX only

Hi Volkmar,

Thanks for your advise.
Refer to your advise :
This is my /etc/shutdown.allow:
+ stop
+ root

what it mean + stop? this stop is username? I refer to your replied before, insert '+ ' in /etc/shutdown.allow.

Mardi
V. Nyga
Honored Contributor

Re: Create user with option can shutdown HP-UX only

yes - 'stop' is my second user, who can shutdown the ws.

Sorry, was not clear enough from my side.
Volkmar
*** Say 'Thanks' with Kudos ***
mardimarijo
Occasional Advisor

Re: Create user with option can shutdown HP-UX only

Thanks Volkmar.

Why i wan my staff to be able to shutdown as I most of time have to go outstation and want them to be able shutdown the machine but at the same time restrict them to perform job as administrator.

I will inform you when I try on next Monday(April, 6th 2009).
V. Nyga
Honored Contributor

Re: Create user with option can shutdown HP-UX only

That was my intention, too. :-)

But I don't tell them the command, they just have to login as user 'stop'.
In his profile is the shutdown-command, so the ws is shutting down immediatelly.

Volkmar
*** Say 'Thanks' with Kudos ***
mardimarijo
Occasional Advisor

Re: Create user with option can shutdown HP-UX only

Hi Volkmar,

I already edited my shutdown.allow and add 2 line like below:

+ rose
+ root

and saved it. When i login using username rose and try to shutdown using this command:

shutdown -ry 0

this appear:

sh: shutdown: not found.

Can advise me.

Mardi