1846741 Members
5455 Online
110256 Solutions
New Discussion

missign /etc/services

 
hpuxhelp
Regular Advisor

missign /etc/services

host got rebooted now can't telnet in or ftp in because of missing /etc/services??...please help as ap
8 REPLIES 8
Mic V.
Esteemed Contributor

Re: missign /etc/services

I suggest you log in on console and vi /etc/services as root. You should be able to type in some basics to get the system back on its feet, then restore from tape or copy from another system.

For example:
telnet 23/tcp
login 513/tcp

I try to keep a hardcopy of files like this for just this occasion. :)

HTH
Mic
What kind of a name is 'Wolverine'?
Michael Tully
Honored Contributor

Re: missign /etc/services

The /etc/services file is mainly used as a reference file only. If you can't telnet to your system, odd are that the inetd process is not running. Check the /etc/inetd.conf file for the services and then attempt to restart it. (/sbin/init.d/inetd start)
If it still does not start and there are no obvious error messages, make sure the contents of the /etc/rc.config/netdaemons are correct. The best way is compare it with another working system.
Anyone for a Mutiny ?
Michael Tully
Honored Contributor

Re: missign /etc/services

Further to my last note, if /etc/services is missing I wonder what else is missing from your system. Files do not delete themselves. Either you have a pooly written script, or someone with 'root' permissions has removed it (them). If you don't know for sure, change the 'root' password and check what jobs run from 'cron'.
Anyone for a Mutiny ?
Rajeev  Shukla
Honored Contributor

Re: missign /etc/services

to restore the services file you can get a default services file and modify as per your requirement from
/usr/newconfig/etc/services
Steven E. Protter
Exalted Contributor

Re: missign /etc/services

I guess the question that has not been asked is what happened?

HP boxes don't just erase files. Its probably not a disk problem because /etc/services is on the root disk.

So, maybe the root filesystem is kind of full?

On 11.00 that tended to zero out files.

I'd restore the file from another system.

To get telnet and ftp working put the manual entries in the file from the earlier posts.

Best of Luck.

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
Sridhar Bhaskarla
Honored Contributor

Re: missign /etc/services

Hi,

You will need to have /etc/services for all the services that do getservent() calls. So, logon to the system from the console and copy /usr/newconfig/etc/services as /etc/services and restart inetd (inetd -c). Now atleast the basic services will work and you can either restore it from the backup or make modifications to suit to your environment.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Suresh Patoria
Super Advisor

Re: missign /etc/services

Hi,

Login into the system by console
and copy the services file from /usr/newconfig/etc/ directory

Thanx
Ravi_8
Honored Contributor

Re: missign /etc/services

Hi,

reboot the machine, interrupt the boot sequence and get into single user mode.

do fsck for all file sysems
#mount -a
#cp /usr/newconfig/etc/services /etc/services
#init 3
never give up