- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: /etc overwrite
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
10-02-2001 11:53 AM
10-02-2001 11:53 AM
Yesterday, our /etc directory was over written from another box(identical and both running 11.00). Initially I was having a problem getting into SAM(error: 7159, sam.log saying that the filesystem isn't mounted). Realized that the fstab was overwritten, semi-fixed that, but there are other things that I need to look for that I don't know about.
Example: /etc/rc.config.d/netconf IP address and hostname needed to be changed. What else is out there that could bite me in the you know where? Presently I can not connect to the HP box from my PC when I use the correct IP address. However, if I login to our production box and rlogin to the test box(the one with the problem), it will allow me to login.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2001 12:06 PM
10-02-2001 12:06 PM
Re: /etc overwrite
As for losing /etc...geeze :-)
The few critical files that I can think of are the following:
/etc/fstab
/etc/hosts
/etc/sudoers
/etc/shells
/etc/passwd
/etc/profile
/etc/group
/etc/nsswitch.conf
/etc/resolv.conf
And you'll have to recreate /etc/lvmtab (using vgscan) and hopefully you didn't have any printers defined because they might be lost (they should be in /etc/lp).
-Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2001 12:11 PM
10-02-2001 12:11 PM
Re: /etc overwrite
You do have a backup of your system don't you? Perhaps an Ignite/UX make_tape_recovery tape? I would be tempted to restore /etc from whatever form of backup you have.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2001 12:12 PM
10-02-2001 12:12 PM
Re: /etc overwrite
This is not meant to be a complete list but here goes:
/etc/passwd
/etc/group
/etc/hosts
/etc/hosts.equiv
/etc/inetd.conf
/etc/services
/etc/lvmrc
/etc/lvmtab ---> really serious
/etc/fstab
/etc/mnttab
/etc/rc.config.d/*
/etc/nsswitch.conf
if running DNS server: /etc/named.data/*
if a ServiceGuard Node: /etc/cmcluster/*
If it were me, I would restore from backup to /etc2 and then do a cksum on each file and copy the file into /etc if needed.
P.S. Don't do this no more!
Regards, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2001 12:12 PM
10-02-2001 12:12 PM
Re: /etc overwrite
The best thing would be to recover it from a a backup.
If that is not an option you will have to atleast update/recreate the following files (AFAIK)
hosts
passwd
group
nsswitch.conf
resolv.conf
fstab (recreate)
lvmtab (recreate)
rc.config.d is a directory which contains config files which get sourced during startup, you will have to check if everything is ok there
/etc/cmcluster - MC/SG if you use service guard
ntp.conf - for NTP
mail - (/etc/mail contains all your sendmail config/aliases, not sure if you updated any but if you did, you will make sure you make those changes)
Some of the sample files are available in /usr/newconfig/etc, you can copy them and modify them.
As far as recreating the /etc/lvmtab is concerned , you could do a vgscan -p -v (man vgscan) and if everything is ok run vgscan -v which would recreate the lvmtab file.
You definitely will have to update /etc/rc.config.d/netconf and modify the ip address and the hostname.
I may have missed some, but i still think the better option is to do a restore.
-HTH
Ramesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2001 12:14 PM
10-02-2001 12:14 PM
Re: /etc overwrite
Also, check the rest of /etc/rc.config.d/netconf, especially the route information. Do a netstat -nr to check the routes on your server to make sure they are correct. Otherwise you probably need to edit netconf some more.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2001 12:15 PM
10-02-2001 12:15 PM
Re: /etc overwrite
Before you reboot your system make sure your external disk configuration is OK.
run set_parms command and change IP, hostname networks etc..
#set_parms initial (This will reboot your system)
When system will comeup you will have more work to do
/etc/nsswitch.conf, resolv.conf, named.conf, and much more.
Just to change a IP address
#vi /etc/rc.config.d/netconf (change information regarding ip and route)
#/sbin/rc2.d/S340net stop
#/sbin/rc2.d/S340net start
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2001 12:17 PM
10-02-2001 12:17 PM
Re: /etc overwrite
The more I think about this, I think your best bet is to restore from backup in single user mode. If you are using Omniback or some other utility that requires you to be in a higher run level, I would restore to an alternate directory and then go to single user. I would then mv /etc /etc/.old and mv /etc2 /etc and reboot.
Regards and good luck, Clay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2001 12:17 PM
10-02-2001 12:17 PM
Re: /etc overwrite
Check your /etc/inetd.conf file.
Also you may have to recreate the /etc/lvmconf directory, because it now contains information about the VGs from the other machine.
for i in $(ls -1d /dev/vg*)
do
vgcfgbackup $i
done
-Regards
Ramesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2001 12:25 PM
10-02-2001 12:25 PM
SolutionSince this is a test box that has the problem, I'd get my Ignite recovery tape and cold-install it; if nothing else it's good practice.
I think otherwise you may spend more time correcting and verifying key configuration files than this is worth. Consider that you will need to be relatively positive that you have a correct configuration before you boot, not only from the standpoint of a network configuration, but from the standpoint of LVM when volume groups are first activated and filesystems are first mounted.
At least, this was a test server!
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2001 12:33 PM
10-02-2001 12:33 PM
Re: /etc overwrite
-Santosh