Re: reboot-shutdown issue using sudo - HP-UX 11.31 (1168 Views)
Reply
Super Advisor
Trng
Posts: 341
Registered: ‎03-15-2007
Message 1 of 6 (1,324 Views)

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
Acclaimed Contributor
Dennis Handly
Posts: 25,274
Registered: ‎03-06-2006
Message 2 of 6 (1,311 Views)

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

[ Edited ]

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

Honored Contributor
Matti_Kurkela
Posts: 6,271
Registered: ‎12-02-2001
Message 3 of 6 (1,304 Views)

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
Super Advisor
Trng
Posts: 341
Registered: ‎03-15-2007
Message 4 of 6 (1,183 Views)

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
Super Advisor
Trng
Posts: 341
Registered: ‎03-15-2007
Message 5 of 6 (1,182 Views)

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
Acclaimed Contributor
Dennis Handly
Posts: 25,274
Registered: ‎03-06-2006
Message 6 of 6 (1,168 Views)

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

[ Edited ]

>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.

 

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.