System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Create user with option can shutdown HP-UX only

 
Highlighted
Acclaimed Contributor

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

sh: shutdown: not found.

If rose isn't a root user, she needs to use absolute paths to shutdown:
/sbin/shutdown -ry 0

The man page mentions the path:
http://docs.hp.com/en/B2355-60130/shutdown.1M.html
Highlighted
Occasional Advisor

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

Thanks you Dennis.

I try like this:

Login as rose. then cd to /sbin then from that directory I can execute the shutdown -ry 0.

Is there a way i can modify so the user(in this example, rose) no need to change directory before execute the shutdwon command? Like what root can do.
Highlighted
Honored Contributor

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

HI,

>>Is there a way i can modify so the user(in this example, rose) no need to change directory before execute the shutdwon command? Like what root can do.

Just modify rose's .profile and add this line
PATH=$PATH:/sbin
export $PATH

Suraj
Highlighted
Acclaimed Contributor

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

>Login as rose. then cd to /sbin then from that directory I can execute the shutdown -ry 0.

If your home directory isn't on the root volume, you'll have to cd anyway.

>Is there a way I can modify so the user no need to change directory before execute the shutdown command?

You can update PATH as Suraj said. But you shouldn't be using that command that often to really save that much over using the absolute path.
Highlighted
Occasional Advisor

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

Suraj and Dennis,

I think with add user in shutdown.allow is enough for the user to shutdown the after cd to /sbin.

I will try it at real server after office hour and let u all know tommorow.

Mardi
Highlighted
Honored Contributor

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

Hi,

Please assign some points who give there valuable time for your problem.

To know how to assign points please go through the below link.


http://forums13.itrc.hp.com/service/forums/helptips.do?#33

Suraj
Highlighted
Advisor

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

Suppose  two hosts mumbe1 and mumbe2... and now I want on that user "ASHISH" can shutdown the both the hosts.

 

So what will be the steps...

 

1 vi /etc/shutdown.allow

2 + ASHISH  mumbe1 mumbe2

3 wq!

 

 

so is these steps are ok ... or if there are any changes please revert me back as soon as possible.

Acclaimed Contributor

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

>Suppose  two hosts mumbe1 and mumbe2

 

Then you need to have:

+ root

mumbe1 ASHISH

mumbe2 ASHISH

 

Note: This file must be present on both systems.

 

Highlighted
Advisor

How to restrict FTP users

Can give you details about how to restrict certain FTP users .

Highlighted
Acclaimed Contributor

Re: How to restrict FTP users

See the manpages for ftpaccess(4) and ftphosts(4).