.cshrc and .login overwritten !!


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users .cshrc and .login overwritten !!
# 1  
Old 06-01-2004
Question .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 certain UNIX commands ?? Smilie Smilie

Thx
--gjthomas
# 2  
Old 06-08-2004
A group does not get a .cshrc and .login. What directory were these files in? Your home directory perhaps?
# 3  
Old 06-08-2004
pqrs is a seperate account. (not a group)

.login and .cshrc were in my home directory and pqrs had its own .cshrc and .login.

strangely mine got copied into pqrs's home directory
# 4  
Old 06-08-2004
Whoever owns those files is the person who copied them.

You can copy files for example, by using an editor incorrectly, or misusing the mv statement. It's not hard to inadvertantly overwrite a file.

Plus, it sounds like protections aren't what the should be.
If you and pqrs are in the same group, protections on pqrs' home directory need to be changed. If you aren't in the same group, it means his home directory (or yours) is open to the world. Probably not cool.

If you need to share files, use /tmp - or create a standard exchange subdirectory for each user - that has group read/write permissions so everyone can copy & read files in the directory.

There is no real audit trail for file activity. The only thing you can do is to stop it from happening again.
# 5  
Old 06-08-2004
Hi --

u said use /tmp ... This may be a reason !

I recently added setenv TMPDIR = /tmp to .cshrc for pqrs's account.... Is there a connection here that my .cshrc got copied somehow ?

I needed to add /tmp so that CVS would work for me and pqrs due to a recent upgrade to the server...
# 6  
Old 06-08-2004
Quote:
Originally posted by gjthomas

I recently added setenv TMPDIR = /tmp to .cshrc for pqrs's account....
This means you edited what you thought was his .cshrc file.
The chances are very good that you did it by accident - saving your .cshrc file in his directory during an edit session.

Let me try this one last time: a human did this by accident.

The other possibilities are so far-fetched that they don't deserve
real consideration. The person who did it needed to be able to read your files and write his files. You just indicated that you fall into that set of people. Enumerate users can read your files and write his. Those are the folks who could have done it.

It was not done by some weird environment setting.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

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

2. UNIX for Dummies Questions & Answers

Explaining some lines from files : .login and .cshrc

Hello, can anyone explain me please what do those lines do ? From file .login 1) set history=40 2) setenv MACH `uname -s` 3) source /etc/login 4) source ~/$MACH/.login From file .cshrc 1) if ( ! $?prompt) exit 0 (5 Replies)
Discussion started by: bbqtoss
5 Replies

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

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

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

6. Shell Programming and Scripting

diffrence between .cshrc .login .profile

Hi.. i was just looking to know the diffrence between this three terms 1) .cshrc 2) .login 3) .profle but iam failed to findout the exact diffrent Please can any one share the diffrence between this regards Syed (1 Reply)
Discussion started by: smuqtaderali
1 Replies

7. UNIX and Linux Applications

diffrence between .cshrc .login .profile

Dear experts ... Please any one can describe the diffrence between this three 1) . cshrc 2) .profile 3) .login cheers syed (1 Reply)
Discussion started by: smuqtaderali
1 Replies

8. UNIX for Dummies Questions & Answers

Clarification on .cshrc,.exrc,.login,.profile,.sh_history files

All, I had a request to delete filed under a directory that was 35 days old . And they asked me to scedule it in CRON . I have done that . I have use find and delete with mtime to perfrom this task . But my script is not deleting this .cshrc,.exrc,.login,.profile,.sh_history file... (1 Reply)
Discussion started by: arunkumar_mca
1 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 Dummies Questions & Answers

why i have local.profile, local.cshrc,local.login instead of .profile, .login ?

Hello again ! Thanks for response of my first question. there is my second quesiton why i have local.profile instead of .profile file ? my all files in pwd shoes local. before any file. is anybody can tell me about that ? Thanks Abid Malik (5 Replies)
Discussion started by: abidmalik
5 Replies
Login or Register to Ask a Question