- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: can not update /etc/services
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 05:58 PM
07-11-2002 05:58 PM
can not update /etc/services
Even though I add new configuration to /etc/services by ROOT user, it remains unchanged after re-booting.
Needless to say, I typed ":wq" to end vi editor.
However, once I do re-boot server, those added lines disappear!! Why?
( Sorry for my terrible English. I am Japanese.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 06:02 PM
07-11-2002 06:02 PM
Re: can not update /etc/services
The default permissions of /etc/services are
-r--r--r-- 1 bin bin 13267 Jun 25 15:58 /etc/services
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 06:12 PM
07-11-2002 06:12 PM
Re: can not update /etc/services
you have to type :wq! as it is read only file.
Can you tell us what exactly u are adding in /etc/services file?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 09:10 PM
07-11-2002 09:10 PM
Re: can not update /etc/services
Following is the current file status.
As you see, it is writable somehow..
[-rw-r--r-- 1 ftp2smtp ftp2smtp 9648 Jul 12 13:19 services]
Even though I changed the mode to Read Only, the file mode was retrieved as above after re-boot..So strange!
ups 12000/upd
ups 12000/tcp
xups 12010/upd
I just want to add above three lines.
After updating, I opened the file and conrirmed surly the file was updated.
Therefore I assumed ":wq" did work...
Will try ":wq!" for next trial anyway.
* Is it really no need to re-boot for updating
/etc/services?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 09:27 PM
07-11-2002 09:27 PM
Re: can not update /etc/services
Your English is fine!!!
Like many updates to your system, updating /etc/services or /etc/inetd.conf DOES NOT require a reboot after making changes. Some files may need a refresh to the command but definitely not a reboot.
HTH
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 09:29 PM
07-11-2002 09:29 PM
Re: can not update /etc/services
Your English is fine!!!
Like many updates to your system, updating /etc/services or /etc/inetd.conf DOES NOT require a reboot after making changes. Some files may need a refresh to the command but definitely not a reboot.
HTH
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 10:33 PM
07-11-2002 10:33 PM
Re: can not update /etc/services
Changes in /etc/services and
/etc/inetd.conf should be followed by a restart of inetd
daemon to re-read those files
for new configuration to come in to effect. So you have to
do this after updating those files.
#inetd -c
you need not reboot the system.
regards,
U.SivaKumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-11-2002 11:31 PM
07-11-2002 11:31 PM
Re: can not update /etc/services
I think this is not a good idea it should be owned by user "bin" and group "bin".
If your /etc/services file gets changed on boot-time, maybe one of your rc-scripts makes this changes. You could do:
cd /sbin/init.d
grep services *
On my machine (HPUX11i) it seams that the nfs.core scripts does really update /etc/services (if needed) on boot time. Check this and other rc-scripts on your machine.
Hartmut
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2002 12:41 AM
07-12-2002 12:41 AM
Re: can not update /etc/services
Sivakumar.
I understand I no need to reboot!
Thanks to this advaice, I could test with ease.
I have tried to add three lines to
/etc/services and ":wq!", also I have changed
the file permission from -rw-r--r-- to
-r--r--r--, then submit "inetd -c" from root user.
After that, I realized that
/etc/services is being reinstated automatically,
regardless re-boot or not!
I checked the file permission in every about 5 seconds. As you can see below, "-rw-r--r--" appears!!
This means the contents also relapsed.
-r--r--r-- 1 ftp2smtp ftp2smtp 9704 Jul 12 16:15 services
# ll services
-r--r--r-- 1 ftp2smtp ftp2smtp 9704 Jul 12 16:15 services
# ll services
-r--r--r-- 1 ftp2smtp ftp2smtp 9704 Jul 12 16:15 services
# ll services
-r--r--r-- 1 ftp2smtp ftp2smtp 9704 Jul 12 16:15 services
# ll services
-rw-r--r-- 1 ftp2smtp ftp2smtp 9648 Jul 12 16:16 services
Wondering this is my server specific problem?!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2002 12:53 AM
07-12-2002 12:53 AM
Re: can not update /etc/services
Check your cron jobs for any script that is monitoring /etc/services and replacing it:
# grep '/etc/services' /var/spool/cron/crontabs/*
If nothing comes out of that, then run lsof on /etc/services:
# while sleep 1;do lsof /etc/services;done
This will monitor what process actually accesses /etc/services during the change.
Hope this helps. Regards.
Steven Sim Kok Leong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2002 01:00 AM
07-12-2002 01:00 AM
Re: can not update /etc/services
You can download lsof from:
http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.61/
After you installed lsof, the sequence of steps you can perform to monitor is:
# vi /etc/services
:wq
# while :;do lsof /etc/services;done
If a process is accessing /etc/services to change it, the process should appear promptly during the lsof.
Btw, you don't need to run inetd -c when you only modify /etc/services. It is only a lookup table.
You can verify this by doing this:
# echo "test 21/tcp" >> /etc/services
# telnet an_ftp_server test
You should see the FTP banner promptly, verifying that "test" is translated to TCP service port 21.
Hope this helps. Regards.
Steven Sim Kok Leong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2002 01:33 AM
07-12-2002 01:33 AM
Re: can not update /etc/services
ps -ef | grep ftp2smtp will show you all the according processes. One of these will do this "magic" thing.
Hartmut
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2002 01:35 AM
07-12-2002 01:35 AM
Re: can not update /etc/services
Thank you for your help.
Actually, I am wondering why the user/group is not "bin".. Will ask what you pointed to our vendor who installed the OS.
Have run the advised command;
[# cd init.d
# grep services *]
then suspicious results came out!
nfs.core:grep "2049/tcp" /etc/services > /dev/null 2>&1
nfs.core:cp -p /etc/services /etc/services.update
nfs.core:/etc/services >/etc/services.update
nfs.core:mv /etc/services.update /etc/services
Also I have downloaded "lsof".
Will try to run the sequence step.
Thanks!
Imai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-12-2002 01:49 AM
07-12-2002 01:49 AM
Re: can not update /etc/services
chown bin:bin /etc/services
and
chmod -w /etc/services
your "magic" process might not be able to rewrite your /etc/services-file.
Hartmut
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2002 01:44 AM
07-15-2002 01:44 AM
Re: can not update /etc/services
Have submitted "lsof" and changing owner ID/Gourp ID.
Results are as follows;
1/ Unfortunately, our server is 64bit kernel.
Therefore, downloaded "lsof" command did not run...
2/ Submitted "chown bin:bin" and "chmod -w",
but /etc/services was returned somehow...!
I am asking our Vendor to give us solutions,
but nothing they reply so far..
As I am not a professional user of UNIX,
I am very happy to have a lot of very useful information
from all of you here.
Now, I'm trying to make a shell to run "ps -ef | grep ftp2smtp" for two minutes.
Thanks.
Imai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2002 02:58 AM
07-15-2002 02:58 AM
Re: can not update /etc/services
You should be able to download the source for HP-UX 11.00 and compile the source on HP-UX 11.00 64-bit. Once the binary is compiled, it should be able to run properly in your 64-bit HP-UX.
Hope this helps. Regards.
Steven Sim Kok Leong
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2002 02:58 AM
07-15-2002 02:58 AM
Re: can not update /etc/services
I bet you have an Intrusion Alert process that is detecting that /etc/services has changed and is changing it back. Ask your vendor about it.
for an 11i system try the attachment:
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2002 09:40 PM
07-15-2002 09:40 PM
Re: can not update /etc/services
Thanks. I could find and could download "64".
However, I was said "Execute permission denied". Pls see below;
# lsof
sh: lsof: Execute permission denied.
# while sleep 1; do lsof /etc/services;done
sh: lsof: Execute permission denied.
sh: lsof: Execute permission denied.
sh: lsof: Execute permission denied.
**--File Permission-----**
-rwxr-xr-x 1 bin sys 252940 Jul 16 11:01 lsof
Is there any other step to activate it?
Harry,
Thanks for your reply. Somehow I can not retrieve the attachment file.(Error occured)
Is it a script or something?
Could you please kindly paste the contents
here, if possible.
Thnaks,
Imai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-15-2002 11:23 PM
07-15-2002 11:23 PM
Re: can not update /etc/services
try this
./lsof /etc/services
regards,
U.SivaKumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2002 07:24 PM
07-16-2002 07:24 PM
Re: can not update /etc/services
Download the source gzip'ed tarball from the following link:
http://hpux.cs.utah.edu/ftp/hpux/Sysadmin/lsof-4.61/lsof-4.61-ss-11.00.tar.gz
Then compile it:
# ./configure
# make
# make install
Hope this helps. Regards.
Steven Sim Kok Leong