Prevent the creation of any other Admin account on the server


Enter Your Query:
Use '%' for wildcards and quotes for "exact phrases"


Top Level » DirectAdmin

Prevent the creation of any other Admin account on the serverLast Modified: Jan 23, 2011, 11:53 pm
If you only have 1 Admin account and want to make sure no other Admin account is created, you can use the all_pre.sh in order to check the command being run, and block it if it's the creation of an Admin.

Create: /usr/local/directadmin/scripts/custom/all_pre.sh, and in it, add the code:

#!/bin/sh
if [ "$command" = "/CMD_API_ACCOUNT_ADMIN" ]; then
    echo "Cannot use this command";
    exit 1;
fi
if [ "$command" = "/CMD_ACCOUNT_ADMIN" ]; then
    echo "Cannot use this command";
    exit 1;
fi
exit 0;

 
Related Helpfiles
I only want my IP to be able to execute Admin level commands

© 2018 JBMC Software, Suite 173  3-11 Bellerose Drive, St Albert, AB  T8N 1P7  Canada.  Mon-Fri 9AM-5PM MST