useradd - run script?
I know that there is a file called /etc/default/useradd and you can specify certain defaults. For example you can put files into /etc/skel and it would copy those files into /home/user/ when "user" is created.
Is there any way to run a particular script when a user is created? Like append a virtual host configuration to apache when a user is created? |
sure, just wrap that command with your own script.
|
Well... that's what I ended up doing. I was hoping there was another way to do it. Oh well.
|
why would you want / need another way?? There are other ways, like watching for changes in the passwd file or periodically scanning all user directories and ensuring they are all correctly configured i guess, none as good was just wrapping useradd in the first place.
|
Quote:
|
All times are GMT -5. The time now is 08:35 PM. |