Operating System - HP-UX
1822355 Members
5915 Online
109642 Solutions
New Discussion юеВ

duplicate entries in /etc/services

 
SOLVED
Go to solution

duplicate entries in /etc/services

Hi folks,
I have a customer who wants to add an entry in /etc/services that would call for the same port/protocol of an existing entry. What would happen in this situation? Would the first entry get the port/protocol? Would the port/protocol no get assigned?
The same customer has the initial entry.
Thoughts?
Thanks,
Pat Moorhouse, T-Mobile
2 REPLIES 2
RAC_1
Honored Contributor
Solution

Re: duplicate entries in /etc/services

Nothing happens if you just add entry to services file. you will have to restart indetd to take effect. Even if you restart inetd, first entry will be used and not second. Second would receive error message that port already in use or something similar.
There is no substitute to HARDWORK
James R. Ferguson
Acclaimed Contributor

Re: duplicate entries in /etc/services

Hi Pat:

Given your description, create an alias for the service. For example:

# shell 514/tcp cmd

...defines 'cmd' as an alias for 'shell'. See the manpages for 'services(4)' and 'getservent(3N)' for more information.

Regards!

...JRF...