LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   /etc/passwd help (http://www.linuxquestions.org/questions/linux-general-1/etc-passwd-help-57793/)

debdas 05-02-2003 06:01 AM

/etc/passwd help
 
Can anyone tell me how /etc/passwd gets updated when a new user is added. I need to maintain a file similar to /etc/passwd thats updates itself when /etc/passwd gets updated. Can anyone tell me how i can do this?


Thanks

Mik 05-02-2003 07:02 AM

Well usually it's done through the useradd command. But it's also possible to manually update /etc/passwd with for example vipw.

You could always write a wrapper script for the useradd command which also updates your other file. But that wouldn't include updates which are done through other methods. You could also create a cron script which checks for updates to the /etc/passwd by maybe checking the modified timestamp and then updating your other file accordingly.

Maybe you would like to explain a little more what needs to get updated in the similar file? Is this only a list of names or is this also dependant on other changes in the /etc/passwd file? Like if someone changes their shell.

debdas 05-09-2003 06:02 AM

Re:/etc/passwd
 
What I actually want to do is maintain a file that holds all the groups and the users under that group...so i need to update my file when ever a new user and group gets added...

I have no idea about cron scripts and what they do. If you can tell me something about it or tell me where I can read up that would be very helpful


Thanks for the help

Debdas

nakkaya 05-09-2003 02:28 PM

man cron would be a good start cron service executes some user predefined tasks on user predefined time intervals.


All times are GMT -5. The time now is 07:41 AM.