I want to write something on file when user added.

August 16, 2015 1.6k views

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

1 Answer


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


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

Have another answer? Share your knowledge.