Sponsored Content
Operating Systems HP-UX Parameter to avoid file being deleted by SAM Post 302351111 by instant000 on Monday 7th of September 2009 07:20:11 AM
Old 09-07-2009
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.
 

8 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. 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
All times are GMT -4. The time now is 12:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy