Unix ID deleted - What happen to process


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Unix ID deleted - What happen to process
# 1  
Old 03-31-2008
Unix ID deleted - What happen to process

I have an unix id (AIX system) which is used to run a couple of processes. They also write some log files into a file system (that is not in the home directory of the user id, but in different location).

One bad day, the id was deleted accidentally. But the home directory, files and everything else were safe.

The processes were running for long time, say days or weeks. I did not see they were stopped or affected directly due to the id deletion. However, the application that uses the processes was not behaving the way it had to.

My questions are:

1. How long the processes will go, after the id got delted?
2. What happens if one of the processes is trying to write the log throug the delted user id?
3. Any other hints or notes that will help me in this situation?
# 2  
Old 04-03-2008
This is not a big deal to a running process unless it is coded to check for it and take some action. If larry was uid 1234, but you deleted larry from the system leaving some files existing and a process running, then ls and ps can only display the numeric uid as the owner, but other than that there is no problem. The kernel does not check /etc/passwd over and over again to allow a process to run. In fact it never checks /etc/passwd. Suppose that uid 5678 has never been assigned. A root process could still switch to uid 5678 and run normally. This uid 5678 process could create files in a world writable directory or a directory writable by its group. Files owned by uid not in the passwd file are common in an NFS environment.

Modern versions of cron are usually coded to check that an account is valid prior to starting a cron job. So if larry had any cronjobs or atjobs they probably would stop running.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to list deleted files in UNIX?

Hi All, Its an interview question. I just want to know the answer of below question. 1) How to list deleted files in unix (13 Replies)
Discussion started by: pspriyanka
13 Replies

2. Solaris

Do Linux "Sleep Mode" Problems Happen on UNIX?

I am an experienced MS Windows user who has tried four different flavors of Linux: Mandriva, Centos, Debian, and Ubantu---each on a different PC. (I always used a dual-boot configuration with Grub and Win XP or Win 7). Each time, I encountered the following two problems: While resuming from... (2 Replies)
Discussion started by: mjdz
2 Replies

3. UNIX for Dummies Questions & Answers

What Does Happen During Boot Process? - BIOS and MBR

I'm talking about boot process in multi-boot Linux perceptive. Please tell me whether my explanation is right or wrong? If wrong, please explain. "The BIOS checks the system and loads this initial bootstrapping code into memory. This initial bootstrap code searches for an active partition... (0 Replies)
Discussion started by: f.ben.isaac
0 Replies

4. Programming

what would happen if a process wrote to its own stdin?

what would happen if a process wrote to its own stdin? #include<unistd.h> #include<fcntl.h> int main() { if((write(STDIN_FILENO,"arrgh!",6))==-1) { perror("error writing to file"); } } output: $ gcc temp.c $ ./a.out arrgh!$ (9 Replies)
Discussion started by: c_d
9 Replies

5. UNIX for Dummies Questions & Answers

Restoring back a deleted file in unix.

Hi, Can any one tell me how to restore back the deleted file in unix? I know the file name. If i know the inode number of the file does help more to restore back the file? (1 Reply)
Discussion started by: siba.s.nayak
1 Replies

6. UNIX for Dummies Questions & Answers

how to recover deleted files in unix

Hi Experts, by mistake i deleted some files that are very important to the project. is there any way that i can recover those files,there is no backup for that but the details of the file we know. This will be a great help. Thanks (5 Replies)
Discussion started by: namishtiwari
5 Replies

7. UNIX for Dummies Questions & Answers

recover deleted file in unix

hi after using rm command how to recover the deleted file (7 Replies)
Discussion started by: arulkumar
7 Replies

8. UNIX for Dummies Questions & Answers

Is it possible to find out how/when/who deleted particular dierectory on UNIX Aix3

Hi.. I am new to unix. And I am trying to learn more about admin part of it. We have come across a situation where one of the directory gets deleted everyday at 4:00 pm by some process. We are unable to find out what deletes that directory, seems like a automated job.. but there is nothing... (9 Replies)
Discussion started by: vipas
9 Replies

9. UNIX for Dummies Questions & Answers

lost or deleted data in Unix?

Quote: "Until the space is used for another file, it is not deleted and the data can be recovered (although it may require jumping through hoops)." Unquote I know this is true in the Windows world, but I didn't think it was true of Unix. I had always been told once it was deleted in Unix, it... (1 Reply)
Discussion started by: wmosley2
1 Replies
Login or Register to Ask a Question