Operating System - HP-UX
1752604 Members
4370 Online
108788 Solutions
New Discussion

Re: Not a Single command is working in HP-UX

 
Vishal_1980
Regular Advisor

Not a Single command is working in HPUX

Hello Expert ,

 

On one of my test server not a single command is working.

 

Please advice.

 

Thanks ,
Vishal

9 REPLIES 9
Dennis Handly
Acclaimed Contributor

Re: root's PATH is missing /usr/sbin

What HP-UX version?  What errors do you get?

Vishal_1980
Regular Advisor

Re: Not a Single command is working in HP-UX

HP-UX CRMPRD B.11.31 U ia64 3800860972 unlimited-user license

Error:
# ioscan -fnC tape
sh: ioscan: not found.

 

And this is for every comand that i am running


please suggest further ..

Thanks ,
Vishal

Dennis Handly
Acclaimed Contributor

Re: root's PATH is missing /usr/sbin

># ioscan -fnC tape -> sh: ioscan: not found.

 

This looks like PATH isn't set properly.  What is the value of $PATH?

What does this show:

/sbin/ioscan -fnC tape

Vishal_1980
Regular Advisor

Re: Not a Single command is working in HP-UX

the /sbin/ioscan -fnC tape shows this ..

# /sbin/ioscan -fnC tape
Class I H/W Path Driver S/W State H/W Type Description
==================================================================
tape 0 0/0/8/1/0.1.1.255.0.0.0 stape CLAIMED DEVICE HP U ltrium 4-SCSI
/dev/rmt/0m /dev/rmt/c14t0d0BEST
/dev/rmt/0mb /dev/rmt/c14t0d0BESTb
/dev/rmt/0mn /dev/rmt/c14t0d0BESTn
/dev/rmt/0mnb /dev/rmt/c14t0d0BESTnb

whereas the $PATH value is

# echo $PATH
/usr/bin:/usr/ccs/bin:/usr/contrib/bin:/usr/contrib/Q4/bin:/opt/perl/bin:/opt/gvsd/bin:/opt/ipf/bin:/opt/nettladm/bin:/opt/fcms/bin:/opt/wbem/bin:/opt/wbem/sbin:/opt/sas/bin:/opt/graphics/common/bin:/opt/atok/bin:/usr/bin/X11:/usr/contrib/bin/X11:/opt/sec_mgmt/bastille/bin:/opt/caliper/bin:/opt/drd/bin:/opt/dsau/bin:/opt/dsau/sbin:/opt/resmon/bin:/opt/firefox:/opt/gnome/bin:/usr/contrib/kwdb/bin:/opt/perl_32/bin:/opt/perl_64/bin:/opt/prm/bin:/opt/propplus/bin:/opt/sfm/bin:/opt/swm/bin:/opt/sec_mgmt/spc/bin:/opt/ssh/bin:/opt/swa/bin:/opt/hpsmh/bin:/opt/thunderbird:/opt/sentinel/bin:/opt/langtools/bin:/opt/gwlm/bin:/opt/ignite/bin
Dennis Handly
Acclaimed Contributor

Re: root's PATH is missing /usr/sbin

>whereas the $PATH value is

 

This is not a valid path for root.  You need to have /usr/sbin and /sbin in it.

Vishal_1980
Regular Advisor

Re: Not a Single command is working in HP-UX

Please help me out to resolve this ...

thanks
VIshal
Dennis Handly
Acclaimed Contributor

Re: root's PATH is missing /usr/sbin

>Please help me out to resolve this

 

I thought I did.  The previous post should have been enough to tell you to do:

PATH=/usr/sbin:$PATH:/sbin

Bill Hassell
Honored Contributor

Re: Not a Single command is working in HPUX

>> On one of my test server not a single command is working.

 

I'm not sure I understand this correctly. If no comands are working, this would include login and the Unix shell, etc.

 

For all Unix style systems and even the lookalike MSDOS program,  typing just the name of a command is a shortcut.  There is no reason to expect the command to be found at all unless the PATH variable includes the rest of the command's location, also known as the full path. Every command on the computer will work if you start the command with "/" and follow that with the parent directories.

 

For ioscan, the path for ioscan is /usr/sbin. Apparenlty your system does not customize your login PATH variable to include /usr/sbin. NOTE: /usr/sbin normally contains root-only commands. ioscan can only be run by the root user *unless* you use the -k option.

 

Unix PATH variables are pretty basic stuff. You might want to look over a introduction to Unix and look specifically at how to add to your PATH variable using your login profile.



Bill Hassell, sysadmin
Vishal_1980
Regular Advisor

Re: Not a Single command is working in HPUX

Thanks sir ,i will definitely follow your advice.

Regards,
Vishal