I want to write something on file when user added.

August 16, 2015 1.4k views
Apache

When a user added by adduser, I want to write on virtual host file. Is that possible?

1 Answer

Hi,

If the virtualhost is part of the user's home directory, you could use the --skel argument to adduser. More info here:

http://manpages.ubuntu.com/manpages/dapper/man8/adduser.8.html

You can also set the skel directory by default through this file:

/etc/adduser.conf
Have another answer? Share your knowledge.