System Administration
Showing results for 
Search instead for 
Do you mean 

users with shutdown priviledge

SOLVED
Go to Solution
Regular Advisor

users with shutdown priviledge

Hi,

I am setting NIS users up with shutdown priviledges, however, when user executes SAM and selects shutdown, the system gives this error message:

Unexpected Exit: process ( trap "" 27 28; /usr/sbin/sync; cd /; /usr/sbin/shutdown -y -r 60 > /dev/console 2> /dev/null) exited with a non-zero exit status

The system could not be rebooted because of the following reason: The command "(trap "" 27 28; /usr/sbin/sync; cd /; /usr/sbin/shutdown -y -r 60> /dev/console 2>/dev/null)" failed.

How do I fix this?

Thank you very much for your help.

Tuan Nguyen
1 ACCEPTED SOLUTION
Honored Contributor Honored Contributor

Re: users with shutdown priviledge

Tuan,
try executing the individual commands as the NIS user. Should the users also be in the shutdown.allow file (we are not running NIS)?
Regards
8 REPLIES
Honored Contributor Honored Contributor

Re: users with shutdown priviledge

Tuan,
have a look at your shutdown.allow file.
Are root and the users defined? Or is the file empty?
Regards
Honored Contributor Honored Contributor

Re: users with shutdown priviledge

trap "" 27 28; /usr/sbin/sync; cd /; /usr/sbin/shutdown -y -r 60 > /dev/console 2> /dev/null

One of the above command is failing and that is causing a problem.
There is no substitute to HARDWORK
Regular Advisor

Re: users with shutdown priviledge

Peter,

Thank you for your quick response.
The shutdown.allow has the hostname and the username.
Ex:

cam13 tuan

tuan
Regular Advisor

Re: users with shutdown priviledge

RAC,

Thank you for your quick response.

Do I need to execute these command manually and see why they failed? All these commands are for root only, I don not know if I can exexute them as user.

Tuan
Honored Contributor Honored Contributor

Re: users with shutdown priviledge

Tuan,
try executing the individual commands as the NIS user. Should the users also be in the shutdown.allow file (we are not running NIS)?
Regards
Honored Contributor Honored Contributor

Re: users with shutdown priviledge

trap "" 27 28; /usr/sbin/sync; cd /; /usr/sbin/shutdown -y -r 60> /dev/console 2>/dev/null

Just redirect error (2 > /tmp/error.log) This would give info on what is failing.

Anil
There is no substitute to HARDWORK
Regular Advisor

Re: users with shutdown priviledge

Peter, RAC,

I am able to run /usr/sbin/shutdown -y -r at the command line as user now. Thank you very much for your help. I really appreciate it.

Tuan
Highlighted
Honored Contributor Honored Contributor

Re: users with shutdown priviledge

For every command that you use, add >> /tmp/error.log 2>&1 and check error.log file for errors.

You will have to remove 2>/dev/null

Anil
There is no substitute to HARDWORK