I want to added public_html and private_html folders for users of my web server (Fedora 8 or 10 or something). Where is the script that will create those folders for them when they log on? Is there one script for first logon and a different script for subsequent logons? What is the normal way this is accomplished?
Asked
Active
Viewed 563 times
2 Answers
14
Fedora will copy the contents of /etc/skel into your newly created home directories upon account creation. You can just toss empty public_html and private_html directories there.

Michael Havas
- 708
- 1
- 6
- 10
-
7It's not just Fedora - that's a standard location for Linux/Unix distributions in general. – baumgart Jul 28 '09 at 18:41
4
In debian you can provide a script that is run after adduser is called. Perhaps fedora has something analog. You can use this script, if you have further things to do...
Here a snippet from man adduser
If the file /usr/local/sbin/adduser.local exists, it will be executed
after the user account has been set up in order to do any local setup.
The arguments passed to adduser.local are:
username uid gid home-directory
The environment variable VERBOSE is set according to the following rule:
0 if --quiet is specified
1 if neither --quiet nor --debug is specified
2 if --debug is specified
(The same applies to the variable DEBUG, but DEBUG is deprecated
and will be removed in a later version of adduser.)

Dennis Williamson
- 62,149
- 16
- 116
- 151

ThorstenS
- 3,122
- 19
- 21