Operating System - HP-UX
1747988 Members
4919 Online
108756 Solutions
New Discussion

Re: reboot-shutdown issue using sudo - HP-UX 11.31

 
Trng
Super Advisor

reboot-shutdown issue using sudo -HPUX 11.31

Hi Team,

 

we have recently purchased hpux blade servers with HPUX 11.31 having sudo .i can do all activiites with sudo .when i issue shutdown /reboot commnd using sudo ,its  stopping all user process etc,unmounting filesystem etc like all steps ,but system not rebooting/shutdown  .how to fix this ?

 

 

rgds,suresh

administrator
5 REPLIES 5
Dennis Handly
Acclaimed Contributor

Re: reboot-shutdown issue using sudo - HP-UX 11.31

You do know that you don't need sudo to shutdown?  There is a /etc/shutdown.allow file.

Matti_Kurkela
Honored Contributor

Re: reboot-shutdown issue using sudo -HPUX 11.31

What's the exact command you're using?

 

If you use the "shutdown" command without either the "-r" or "-h" option, the system will go to single user mode, and will only be accessible from the console (e.g. through the iLO). This is how the shutdown command is supposed to work.

 

To reboot HP-UX using sudo, your command should be like:

sudo shutdown -r now

 Or if you wish to shutdown the blade so that it will power off, the command should be like:

sudo shutdown -h now

 

MK
Trng
Super Advisor

Re: reboot-shutdown issue using sudo -HPUX 11.31 **Help required**

Hi Team,

 

still i am facing same issue ..with sudoers i can intiate the shutdown or reboot command and system intiated the shutdown command (that is started killing each process ) and finally my connection also getting disconnected ...but system never going for a reboot/shutdown ..is it  a know issue in hpux sudo  ?

 

 

rgds

administrator
Trng
Super Advisor

Re: reboot-shutdown issue using sudo -HPUX 11.31 **Help required**

what i beleive is 

 

  What happens is  that /sbin/reboot (which is run by /sbin/shutdown) sends a SIGTERM signal to all processes before it calls the reboot system call.When sudo receives the SIGTERM, it passes the signal to the command it is running (shutdown or reboot) which kills the reboot process before it has had a chance to actually reboot the machine.



is it a fix avl in hpux ?
administrator
Dennis Handly
Acclaimed Contributor

Re: reboot-shutdown issue using sudo - HP-UX 11.31

>what I believe is

 

Have you used tusc to show this?

 

>is a fix available in HP-UX?

 

If this is what's happening, you're out of luck.  sudo isn't going to special case reboot and reboot isn't going to special case sudo.

But I suppose reboot can block SIGTERM.