System Default Values for useradd
The primary tool used to add new users to your Linux system is useradd. This command pro-
vides an easy way to create a new user account and set up the user’s HOME directory structure all at once. The useradd command uses a combination of system default values and command line parameters to define a user account.
To see the system default values used on your Linux distribution, enter the useradd command with the -D parameter.
root@dell:~# /usr/sbin/useradd -D
GROUP=100
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=/bin/sh
SKEL=/etc/skel
CREATE_MAIL_SPOOL=no
The -D parameter shows what defaults the useradd command uses.
If you want webalizer or awstats pages to be available by default for new domains, you can do so by creating:
/usr/local/directadmin/scripts/custom/domain_create_post.sh
In the file add the code
#!/bin/sh
ln -s ../stats /home/$username/domains/$domain/public_html/stats
exit 0;
Then chmod the domain_create_post.sh script to 755.
If you want it to be for awstats, then change the bold stats name to be awstats instead.
Source: http://directadmin.com/
Setting up webmail.domain.com as default for new domains with DirectAdmin
1) You’ll need to setup the virtualhost for apache. This can be accomplished by adding a 2nd virtualhost along side the domains main one.
cd /usr/local/directadmin/data/templates
cp virtual_host.conf custom
cd custom
You’ll need to edit the newly copied virtual_host.conf (or virtual_host2.conf if you’re using apache 2) file , just add the following to the end of whatever you currently have.
</VirtualHost>
<VirtualHost |IP|:80>
ServerName webmail.|DOMAIN|
ServerAdmin |ADMIN|
DocumentRoot /var/www/html/squirrelmail
CustomLog /var/log/httpd/domains/|DOMAIN|.bytes bytes
CustomLog /var/log/httpd/domains/|DOMAIN|.log combined
ErrorLog /var/log/httpd/domains/|DOMAIN|.error.log
</VirtualHost>
Save and exit. Then run
echo “action=rewrite&value=httpd” >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d
to rewrite the httpd.conf files.
2) You’ll also need to setup the dns portition.
cd /usr/local/directadmin/data/templates
cp dns_a.conf custom
cd custom
echo “webmail=|IP|” >> dns_a.conf
This will setup the webmail A record for new dns zones. For existing dns zones, you’ll have to manually add the webmail A record to point to the domains IP.
Source : http://directadmin.com/