Visit The New, Modern Unix Linux Community


Parameter to avoid file being deleted by SAM


 
Thread Tools Search this Thread
Operating Systems HP-UX Parameter to avoid file being deleted by SAM
# 1  
Java Parameter to avoid file being deleted by SAM

Good afternoon.

I am a newbie.

We just had a potentially big problem (negated to having good backups).

Basically, there is an option in SAM, to delete all the data from the system that a user ever created.

Lo and behold, silly me, I choose that option, and all sorts of needed files get deleted.

Luckily, we have a good backup.

Unfortunately, I would like to avoid this situation in the future.

Is there a way to choose which directories are *blocked* from being cleared by SAM?

I noticed , from checking thesam_remove.log that the "/var" directory was blocked, for example, but I want the same exclusion for other directories. Is that possible?

Thanks!
# 2  
To avoid this and unexpected results from other commands or options in SAM I suggest you take a Unix course.

Unless you prefer to turn a Unix box into a Windows box.
# 3  
Im not a SAM fan (for I find its a lot fast by command line...but of course you need to know what you are doing...) so I dont see what you are talking about unless of the option when you remove a user, in this case ther is also an option to "give" the ownership of those files to someone else ( by far the safest).
these options were for ease of human beings users administration not for removing application/software users id far more delicate...
# 4  
Java Thanks

Quote:
Originally Posted by sb008
To avoid this and unexpected results from other commands or options in SAM I suggest you take a Unix course.

Unless you prefer to turn a Unix box into a Windows box.
sb008:

Thanks for the suggestion. I feel the same way.

Quote:
Originally Posted by vbe
Im not a SAM fan (for I find its a lot fast by command line...but of course you need to know what you are doing...) so I dont see what you are talking about unless of the option when you remove a user, in this case ther is also an option to "give" the ownership of those files to someone else ( by far the safest).
these options were for ease of human beings users administration not for removing application/software users id far more delicate...
vbe:

Neither am I. I would prefer command line. (If I knew what I was doing.)

Fortunately, I feel that this particular mistake is one that you only make once. Unfortunately, I see myself making this type of mistake in the future, unless I get some self-training going, as I doubt the company is going to pay for it ... far cheaper to them to send people into the fire, and hope they're smart enough (or, in this case, the backups are good enough) to keep things going without any formal training. I hate it where my first exposure to a systems administration task comes from following some script of screenshots, when I don't really know what is going on in the background.

In this particular case, I realized that certain users who were deleted used to have development functions, and the files were created by the developers. Unfortunately, when I chose this option (actually, I was just following a screenshot in the documentation ... no thought processes going on) I had no idea that certain parts of the application were developed/modified by users, thus, those users owned those items, and, when the users were removed, all of the stuff was deleted, too.

At any rate, good backups saved the day. My manager complained that the developers shouldn't have owned any files. I was like, but, hey, this is how it works in a standard manner, you create the file, you own it, nothing wrong with that to me. I told him that I chose the wrong option, and, yeah, maybe a periodic re-owning of the files would help, but I told him that if you chose that same option (to remove all files owned by the user) on this other admin/restricted user account that owned the files, you would have the same problem again (praying for good backups).

Therefore, I thought a good overall solution would be to have the certain directories barred from being deleted by sam, such that this type of problem couldn't happen again (even IF someone chose the wrong option).

But, yeah, I agree with you two both, I'm a newb, and newbs shouldn't be running systems. I just hope that something detrimental to the business (as this incident potentially could have been, as this system houses our ERP) doesn't happen before the company realizes that.

The last 'NIX I touched before working on these systems at work was back during my Army AIT in the year 2000. Everything since that time has been mostly Windows, and a bit of Cisco, but no UNIX at all, until the admin leaves for an Air Force job, and we choose to not hire a new person, but instead have the old guy come in for a few hours (when he can, depending on his commitments to his other job/home).

Oh well, you live and you learn.

I now question my judgment in taking this job (Though, in my defense, it did change a lot from when I was hired until now ... you know the story, ever increasing responsibilities, without any corresponding increase in pay.)

OK, I'm ranting, and this serves no one any aid.

Overall, thanks for your tips. I take them to heart.
# 5  
Welcome to the club...
I started as a developper but shortly was thrown as a sysadmin because thas is what they needed but didnt have the job except a developpers job on unix/oracle...(far long ago...).
I know how it is and think you are lucky, you have this forum and Internet, what I didnt when I started...
Lesson one: You learn by mistakes! (By far the most efficient since you rarely do the same silly mistake twice)
Lesson Two: Sometime you have no other choice than to go ahead...and produce a catastrophy, so before: Check you have a good backup! when it comes to system be sure you have a recent make_recovery tape or image to restore the OS (good practice...) look at the mans:
man make_recovery, vgdisplay lvdisplay etc...
About the developpers :You are right developpers ARE NOT to be owners of applications, only of what they in development/test, that is once in production applicatopn_owner is owner of all files...So Im not the one going to blame you but the chief of dev team.
Be free to ask anyhing here especially if you are unsure of possible consequences.
We will be just to glad to help you
Till nest
Best regards

Last edited by vbe; 09-07-2009 at 10:14 AM.. Reason: spelling...
# 6  
One tip is to lock the account rather than delete the account until you can find a new owner for the files. If the account is deleted the files will just have a numeric owner.

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Test Your Knowledge in Computers #231
Difficulty: Easy
The TCP/IP communications protocols were developed for the ARPANET by Robert Kahn, Vint Cerf and Don Henley of the Eagles.
True or False?

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Write only changes to file - avoid duplicates

I want to create a file, to save a list of fail2ban blocked ip addresses. So I thought I'd create a loop that will check with fail2ban every minute, and write the ip addresses to a file. while true; do echo $(fail2ban-client status asterisk-iptables | grep 'IP list' | sed 's/.*://g' | sed -e... (4 Replies)
Discussion started by: aristosv
4 Replies

2. Shell Programming and Scripting

Avoid overwriting backup file when multiple entries need to replace in one file input from another

Hello, I have been working on script in which search and replace the multiple pattern. 1. update_params.sh read the multiple pattern from input file ParamMapping.txt(old_entry|New_entry) and passing this values one by one to change_text.sh 2. change_text.sh read... (0 Replies)
Discussion started by: ketanraut
0 Replies

3. Shell Programming and Scripting

How to get the parameter value from the parameter file in perl?

hi all, i have a parameter file of following format, i want a method which can get the value of specific parameter. parameter file format: <Parameter Name="FileLocationWindows"> <Description> The directory location of the logger file. ... (1 Reply)
Discussion started by: laxmikant.hcl
1 Replies

4. Programming

[c]Why first file is creating after the second. How to avoid

Hi, My Code is as below: nbECRITS = fwrite(strstr(data->buffer, ";") + 1, sizeof(char), (data->buffsize) - LEN_NOM_FIC, fic_sortie); fclose(fic_sortie); sprintf(PATH_BALISE, "%s.balise", PATH); fic_balise_data = fopen(PATH_BALISE, "a+"); if (fic_balise_data == NULL) {... (1 Reply)
Discussion started by: ezee
1 Replies

5. UNIX for Dummies Questions & Answers

how to know who has deleted the file.

Hi, We have a file which needs supper user previleges to delete. There are 10 users having super user preveleges. Some times back that file got deleted. How to know who has deleted that file? (6 Replies)
Discussion started by: siba.s.nayak
6 Replies

6. Shell Programming and Scripting

How to avoid a temp file

Hi all. I want to check the free space on a given FS and process the output. Right now, I'm using a temp file to avoid using df twice. This is what I'm doing #!/usr/bin/ksh ... df -k $FS_NAME > $TMP_FILE 2>&1 if ]; then RESULT="CRITICAL - $(cat $TMP_FILE)" else cat $TMP_FILE | ...... (3 Replies)
Discussion started by: fox1212
3 Replies

7. UNIX for Dummies Questions & Answers

Avoid Duplicates in a file

Hi Gurus, I had a question regarding avoiding duplicates.i have a file abc.txt abc.txt ------- READER_1_1_1> HIER_28056 XML Reader: Error occurred while parsing:; line number ; column number READER_1_3_1> Sun Mar 23 23:52:48 2008 READER_1_3_1> HIER_28056 XML Reader: Error occurred while... (7 Replies)
Discussion started by: pssandeep
7 Replies

8. UNIX for Advanced & Expert Users

SAM file

I am having a problem on an HP box, where I am being told that there are too many open files. I am also being told I need to change a SAM file. Could some help me understand what a SAM files is and what it is used for. Thanks. (2 Replies)
Discussion started by: kristian
2 Replies

Featured Tech Videos