Operating System - HP-UX
1753305 Members
6527 Online
108792 Solutions
New Discussion юеВ

Re: it could not use commd "shutdown"

 
SOLVED
Go to solution
study unix
Regular Advisor

it could not use commd "shutdown"

Hi Masters,
it could not use command shutdown as below:
# shutdown -r y 0
sh: shutdown: not found.
so I add shutdown shell into PATH as below, but it is not still used ,

#export PATH=$PATH:/sbin/shutdown

pls see my path environment below,
echo $PATH
/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bin:/opt/perl/bin:/opt/ipf/bin:/opt/hparray/bin:/opt/nettladm/bin:/opt/fcms/bin:/usr/bin/X11:/opt/resmon/bin:/opt/perf/bin:/usr/contrib/kwdb/bin:/opt/wbem/bin:/opt/wbem/sbin:/opt/graphics/common/bin:/opt/prm/bin:/opt/sfm/bin:/opt/upgrade/bin:/opt/wlm/bin:/opt/ots/bin:/opt/ots/lbin:/opt/sas/bin:/opt/sec_mgmt/bastille/bin:/opt/dsau/bin:/opt/dsau/sbin:/opt/firefox:/opt/gnome/bin:/opt/mozilla:/opt/perl_32/bin:/opt/perl_64/bin:/opt/sec_mgmt/spc/bin:/opt/ssh/bin:/opt/swa/bin:/opt/hpsmh/bin:/opt/thunderbird:/opt/gwlm/bin:/usr/contrib/bin/X11:/sbin:/home/root=/usr/sbin/shutdown:/sbin/shutdown

who can give some thread to solve it, thanks!

25 REPLIES 25
soandy
Frequent Advisor

Re: it could not use commd "shutdown"

which user id did u use to execute the shutdown command?

Can you try to use root id to execute the shutdown command?
study unix
Regular Advisor

Re: it could not use commd "shutdown"

Hi ,
Uid as below:
# who am i
root pts/tc Aug 10 09:18
soandy
Frequent Advisor

Re: it could not use commd "shutdown"

can you try to use full path as follow.

/usr/sbin/shutdown -r y 0
soandy
Frequent Advisor

Re: it could not use commd "shutdown"

or /sbin/shutdown?

Can you post the output

ll /sbin/shutdown and ll /usr/sbin/shutdown
study unix
Regular Advisor

Re: it could not use commd "shutdown"

Hi,
the full path is the same to fail,
pls see below,

#ll /usr/sbin/shutdown
lrwxrwxr-x 1 root bin 14 Jul 3 23:23 /usr/sbin/shutdown -> /sbin/shutdown
# ll /sbin/shutdown
/sbin/shutdown not found
soandy
Frequent Advisor

Re: it could not use commd "shutdown"

Your /sbin/shutdown file is missing.

can you post the output of ls -ld /sbin?

soandy
Frequent Advisor

Re: it could not use commd "shutdown"

the default setting should be as below:

ls -ld /sbin
dr-xr-xr-x 15 bin bin 8192 Dec 21 2009 /sbin

ll /sbin/shutdown
-r-sr-xr-x 1 root bin 754340 Aug 27 2004 /sbin/shutdown
study unix
Regular Advisor

Re: it could not use commd "shutdown"

Hi,
# ls -ld
dr-xr-xr-x 31 bin bin 8192 Aug 10 16:41 .

how to solve it ?
soandy
Frequent Advisor

Re: it could not use commd "shutdown"

Hi,

Can you post the output of ls -ld /sbin?