1830350 Members
2010 Online
110001 Solutions
New Discussion

HP-UX commands location

 
Ngoh Chean Siung
Super Advisor

HP-UX commands location

Hi,

Pls correct me if I am wrong.

1) Basically all the HP-UX commands is located at /sbin, /usr/lbin and /usr/sbin. Any others path?

2) Any guideline to determine the type of command that will be located in a particular path? Example the LVM commands will be located in /sbin and /usr/sbin.

3) Why the LVM commands will be duplicated in /sbin and /usr/sbin?

4) Inside the inetd.conf, under inetd internal services section, what are the services such as daytime, time, echo, discard and chargen stands for? How to make sure that our server is not running these services? Thru netstat?

regards.
9 REPLIES 9
Steven E. Protter
Exalted Contributor

Re: HP-UX commands location

HP has a very useful commandfor finding commands.

whence

whence sendmail

You will see where it is.

2) they are in two locations to provide functionality in single user and lvm maintenance mode during which /usr may not be mounted.

3) See item 2

4) man inetd will give details.

To make sure they are not running, comment them out in inetd.conf then:

inetd -c

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Ravi_8
Honored Contributor

Re: HP-UX commands location

Hi,

1)all the commnads will be under /usr/bin, /usr/sbin and /sbin

2) whereis

3) commands under /usr/sbin will be used by super user (i.e root) whereas /sbin commands will be used by system at boot time, hence the LVM commands are stored under /sbin as well /usr/sbin

4) netstat shows only network statistics, inetd.conf has the daemons(processes) to be started by inetd process at boot time.
To stop the services, comment the lines that you don't want and refresh the inetd.conf file by issuing the command
#inetd -c
never give up
Ngoh Chean Siung
Super Advisor

Re: HP-UX commands location

Hi,

1) What are daytime, time, echo, discard and chargen stands for? I mean the function of these services.

2) How to ensure that the server is not required to use these services?

regards.
Eric Antunes
Honored Contributor

Re: HP-UX commands location

Hi,

Check this Doc:

http://www.cert.org/advisories/CA-1996-01.html

Best Regards,

Eric Antunes
Each and every day is a good day to learn.
Yogeeraj_1
Honored Contributor

Re: HP-UX commands location

hi,

1) What are daytime, time, echo, discard and chargen stands for? I mean the function of these services.

easy.
man time
man echo
...

2) How to ensure that the server is not required to use these services?

Quite difficult to know. Some of these are core utilities that are need by other OS utilities. In some cases, removing them may cause some programs to crash...


hope this helps
regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Jov
Honored Contributor

Re: HP-UX commands location

>> 1) Basically all the HP-UX commands is located at /sbin, /usr/lbin and /usr/sbin. Any others path?

/sbin and /usr/sbin directories are for "static" binaries. The difference between /sbin and /usr/sbin is to differentiate admin and user space. Binaries in /sbin are there for admin purpose especially in single user mode where only "/" is mounted, thus access to /usr/sbin is not possible.

/usr/lbin is where SAM binaries are store and not until recently, you wouldn't have been able to find docos on them.

Application binaries are found usually in /opt//bin, but some Open Source stuff will put them in the traditional Unix convention in /usr/local/bin or /usr/bin.

>> 2) Any guideline to determine the type of command that will be located in a particular path? Example the LVM commands will be located in /sbin and /usr/sbin.

Beside what I've stated above in 1), I am not aware of any official guide likes, most are formed by convention. HP developers might have access to these guidelines given they might develop HP-UX tools/binaries.

>> 3) Why the LVM commands will be duplicated in /sbin and /usr/sbin?

Its duplicated for the same reason explained in 1). /user/sbin is not accessible in runlevel 0, 1, and S for maintenance purposes, thus its there. When OS is in normal operation (runlevel 3), most admin will use the commands in /usr/sbin, but it really makes no difference (that I am aware of).

>> 4) Inside the inetd.conf, under inetd internal services section, what are the services such as daytime, time, echo, discard and chargen stands for? How to make sure that our server is not running these services? Thru netstat?

If you want to secure you server, its best to hash (#) most, if not all of them out, but ensure your applications does not require them first. Do this on a test server.

Look up the "Bastion Host with HP-UX" doco for some explanations, as most of these are of Unix functions which are not required today (99% of the time).


Cheers

Jov


Patrick Wallek
Honored Contributor

Re: HP-UX commands location

Very few systems use the small services (another name for things like daytime, echo, chargen, etc).

In almost 99% of the cases these can, and should for security purposes, be commented out, or just removed, from the /etc/inetd.conf file.

In the case of commands duplicated between /sbin and /usr/bin: /sbin commands are statically linked, meaning that all libraries that the command needs to function are linked into the executable at compile time. This is to ensure that the commands can function on their own with only the / filesystem available. The commands in /usr/bin are dynamically linked which means that they require the libraries they use to be availalbe, generally in /usr/lib, when they are executed.
Ngoh Chean Siung
Super Advisor

Re: HP-UX commands location

Hi,

##
#
# NCPM programs.
# Do not uncomment these unless you are using NCPM.
#
##

#ncpm-pm dgram udp wait root /opt/ncpm/bin/ncpmd ncpmd
#ncpm-hip dgram udp wait root /opt/ncpm/bin/hipd hipd

dtspc stream tcp nowait root /usr/dt/bin/dtspcd /usr/dt/bin/dtspcd
rpc xti tcp swait root /usr/dt/bin/rpc.ttdbserver 100083 1 /usr/dt/bin/rpc.ttdbserver
rpc dgram udp wait root /usr/dt/bin/rpc.cmsd 100068 2-5 rpc.cmsd
recserv stream tcp nowait root /usr/lbin/recserv recserv -display :0
registrar stream tcp nowait root /etc/opt/resmon/lbin/registrar /etc/opt/resmon/lbin/registr
ar
instl_boots dgram udp wait root /opt/ignite/lbin/instl_bootd instl_bootd

Q1) What is NCPM stands for? How to check whether our system is using NCPM program?

Q2) Can I comment all the services listed above? (dtspc, rpc, recserv, registrar & instl_boots)? Any impact after commenting these services?

regards.
Eric Antunes
Honored Contributor

Re: HP-UX commands location

Hi,

NCPM=Network Connection Policy Manager

For more info check this thread:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=92357

Best Regards,

Eric Antunes
Each and every day is a good day to learn.