Critical files in /etc overwritten EMPTY!


 
Thread Tools Search this Thread
Operating Systems HP-UX Critical files in /etc overwritten EMPTY!
# 1  
Old 09-19-2008
Critical files in /etc overwritten EMPTY!

The following files were wiped out - new empty files were left in their place.

/etc/inittab, /etc/inetd.conf, and /etc/MANPATH

The system is running HP-UX 11i v3 - Mar08.

Anyone seen anything like this?

Any ideas on a way to figure this out if it happens again or a suggested way to prevent and/or detect it.

I know I can make good copies and set up a cron job to monitor the files, but I am not sure how I might detect the cause of the problem.

Thanks!

Ken
# 2  
Old 09-19-2008
Is it possible that someone was running SAM and it got clobbered while trying to write out?
# 3  
Old 09-19-2008
I would hope SAM works a bit more cleanly, but I will glance back through the log (if its still there) to see if anything was going on at the time.
# 4  
Old 09-19-2008
Can you check to see if the ownership/permissions were changed on these files?
What is the likelihood that someone was running a script that might have inadvertently mangled these files? Can you check the date/time stamp on these files?
# 5  
Old 09-19-2008
I cannot check any of those things. The files had to be restored to bring the system back up. BTW, there is no SAM log because this is 11.31, so no SAM.

The date/time is available from one file but that does not really tell me anything at this point.
# 6  
Old 09-19-2008
I was under the impression that, while deprecated, SAM was still available...

Knowing the date/time that the file was cleared should help you to pinpoint when the corruption took place. I'd recommend going through your cron and at logs, etc. to see if something was running at the time that the files were cleared.

You could search all file systems mounted on the host for scripts that might have included the words "inittab", "inetd.conf" and "MANPATH". Once you have the list of possible hits - check to see if any of them had the syntax to clear the files.

You should also check your authlog to see if someone (or some script) initiated a connection at that time, and repeat the search there.
# 7  
Old 09-19-2008
The doc says SAM is deprecated, but it is actually no longer available. The command takes you to SMH.

What is authlog?

Any chance you can provide a command sequence for searching the filesystems for scripts referencing the strings in question? I have some ideas but since I'm very new to UNIX script writing, it would take me some time to create it.

Thanks for all the suggestions!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Replace critical files with errors - pam_UNIX_auth.so.1 & fed

I moved my server while it was running. I was in a hurry. Also it's a bare motherboard with drives in a cage sitting basically on their own. Once I realized how badly I had hurt it doing this, I mounted the board in a tower case I repurposed, mounted the drives, power supply etc. Now the... (1 Reply)
Discussion started by: BillyPrefect
1 Replies

2. Shell Programming and Scripting

How to preserve the value of a variable from being overwritten?

Hi All, I am new new to unix.com, I have a question related to shell scripting. We have a Oracle database backup shell script, which can be used for taking full, incremental & archive log backup based on the parameters passed. Within the script we export a variable as export... (5 Replies)
Discussion started by: veeresh_15
5 Replies

3. What is on Your Mind?

How safe is Dropbox and Ubuntu one? Would you store critical files or programs there? Any comments o

How safe is Dropbox and Ubuntu one? Would you store critical files or programs there? Any comments on the guarantee that the two companies provide and on the technology used for encryption? (1 Reply)
Discussion started by: frad
1 Replies

4. Shell Programming and Scripting

file is getting overwritten

Hello All, I am writing a bash script on Solaris O/S. I looping through an array. For each iteration, i connect to the datatabase and use select statement. Output of which is redirected to .CSV file. here is the code for it. output="loop.csv" elements=${#currency_pair} ... (3 Replies)
Discussion started by: arundhati_s
3 Replies

5. Shell Programming and Scripting

To empty the files

Hi, Using the shell script, how can I empty the files that are under a dir. -Siva (2 Replies)
Discussion started by: gsiva
2 Replies

6. Programming

variables overwritten

Hi, i have some problems with the following code: char *tab_path; char *sep=" \t\n"; char line; char *p; FILE * file; int i = 0; if(fgets(line,MAXLINE,file)!=NULL){ if((p=strtok(line,sep))!=NULL)tab_path=p; while((p=strtok(NULL,sep))!=NULL){ i++; ... (4 Replies)
Discussion started by: littleboyblu
4 Replies

7. Solaris

overwritten rootdisk?

Hi, The dump device on my system was set to /dev/dsk/c0t0d0s7. I have done a savecore -Lv on the system which worked fine. I'm wondering have I overwritten the rootdisk here by mistake? The system is still up but will need to be rebooted due to an error on it. Will it come back up? ... (8 Replies)
Discussion started by: gwhelan
8 Replies

8. Shell Programming and Scripting

Empty Files

Hi, How can I check if a file is empty? I have read that I could done in this way: if then echo "non-zero length file" fi But nothing happens (3 Replies)
Discussion started by: DNAx86
3 Replies

9. AIX

UIDs being overwritten immediately

We have a problem where we delete a user and their associated UID gets dumped back in the UID pool. The if we immediately create a another (new) user, AIX reuses the last UID, the one that was just released. This is causing a problem when reports are being generated because the new users name is... (2 Replies)
Discussion started by: xsys2000
2 Replies

10. UNIX for Advanced & Expert Users

.cshrc and .login overwritten !!

Hi, My account is : abcd I belong to a group: pqrs Some thing straneg happened yesterday. My .cshrc and .login got overwritten into pqrs's .cshrc and .login I obviously did not explicitly overwrite pqrs's .cshrc. Are there any reasons how this could have happened indirectly due to... (5 Replies)
Discussion started by: gjthomas
5 Replies
Login or Register to Ask a Question