DirectAdmin has numerous features that allow the admin to change how it looks, what it can do, and how it does things.
The areas that can be customized are:
1) Skins
These allow the easiest form of control over what the User physically sees. This is good for basic hiding of features, or removing links to areas that you've disabled (if not already hidden). A good starting place to create your own skin is to copy ours, eg:
cd /usr/local/directadmin/data/skins cp -Rp enhanced yourskin
where yourskin is the name of the skin you will be creating.
Note that the skins support embedded scripting (php, perl, etc.. whatever you want), as well as a basic if-then-else system allowing for a “more efficient” method of checking variables and controlling what data to show.
Relating to skins are the lanuage packs. Also, if you want to change the display of one of DirectAdmin's hardcoded items, like a table, you'd have to use this guide. To change the appearance of the login page, see this guide.
2) Pre/Post sh scripts
The pre/post sh scripts are “hooks” which you can create for most common functions that DirectAdmin does. For example, when creating a DirectAdmin User, if you wish to add some extra functionality, you can use the user_create_post.sh to add code to perform some function with root access. A you might have guessed, the post scripts run after that task, and the pre scripts run before the task. The pre scripts are handy because if you exit the script with a non-zero return code, DA will halt and not execute that task.
There are numerous scripts available. Search the versions system for the list of avaiable scripts: List of *_post.sh scripts List of *_pre.sh scripts
There are also numerous examples on how to use these scripts in the KnowledgeBase.
Post.sh script examples:
I want to change the default index.html created with new domains.
How to reset a user on the same day of the month his account was created
How to setup jailed ssh and jailed cgi (beta)
How to enable SpamAssassin for new accounts
What options do I have for setting up an external dns server?
Setup a per-user php.ini to allow open_basedir with suPhp
How to make all files uploaded through the Filemanager chmod to 700
Creating a custom index.html for new subdomains
Creating default packages for new Resellers using the user_create_post.sh script
I want the imap folders created with the email account.
I want domain.com/stats to be present by default
Disable "Local Mail Server" by default for new domains
How to prevent Users from seeing in each other's public_html folders
Using the custom package item feature to alter user httpd.conf files
I wish to have an email-only system for some of my clients
All directadmin.conf values
I want to customize the appearance of DA and what it can do
Pre.sh script examples:
I want to change the default index.html created with new domains.
Ability to limit the POST functions that an account can run.
Using the all_pre.sh script to do custom filtering on any function.
How to setup a limit so that Users/Resellers cannot create more than 200 domains on a server.
How to prevent users from deleting certain files using the File Manager
Prevent adding certain email names using the all_pre.sh script
Using the domain_create_pre.sh to prevent adding of domains for other domains
I wish to have an email-only system for some of my clients
Limiting Reseller and User Level Backup to only be able to run at specific times
All directadmin.conf values
I want to spread out the backup process over a longer period of time to lower the load on the box.
For that extra level of control, we created the all_pre.sh and all_post.sh scripts. These are run after all CMD functions, if those scripts exist. Using these should only be used for tasks that are either do not have their own specific pre/post script (above), or when their purpose is more of a broad range, like IP or username filtering for complete blockaged, or to even just allow certain users access to certain functions. The all_pre.sh is what you'd use to disable a list of functions that DA can do. So if you're disabling functions in step 1) by editing the skins, it's also a good idea to block that CMD in the all_pre.sh so the User cannot just type in the command manually. The all_pre.sh should only be used when needed because it would be run for all CMD scripts which is less efficient than DA just checking for the related pre/post script for that function.
By default the all_pre.sh and all_post.sh scripts only run on pre-defined CMD functions in DA. If you wish to block HTM files, you can enable that functionality with this option
3) Plugins
Plugins are scripts which you create, allowing you to let your Users to do tasks, but only with the process level of their own user ID*. The main benefit of plugins is their ability to be installed with 1 click, work on any OS, any Skin, without needing to do any other modifications to your setup. They're also “safe” in the sense that the calls made by a plugin run only as the User, and not root.
*You can get root access with a plugin if you create a plugin binary with chmod 4755, but can be a huge security risk if done incorrectly, so not usually recommended unless you're completely confident in your security-coding abilities.
4) DirectAdmin API
The DirectAdmin API is a tool that lets your own scripts connect to DirectAdmin to perform certain tasks. The scripts can be local or even remote relative to the DirectAdmin install. The scripts would essentially be an imitation of a web browser, in that the calls made to DA with the CMD_API functions will pass the data in the same format as a browser (99% of the time). The only difference between CMD and CMD_API calls is the data that DirectAdmin returns is parseable. Be sure to search the version system for a listing of all API commands because not all CMD_API commands are listed in the api.html page.
5) General DirectAdmin Options
There are hundreds of options for DirectAdmin, each to accomplish a different functionality. Please be very careful if you chose to make changes to your directadmin.conf. Always make not of what you add or change, and what the previous value was, in case you need to undo your changes.