Linux > DirectAdmin
Prevent the creation of any other Admin account on the DirectAdmin server
(1/1)
vinayakk:
If you only have 1 Admin account and want to make sure no other Admin account is created, you can use the below script in order to check the command being run, and block it if it's the creation of an Admin.
vim /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;
:)
Navigation
[0] Message Index
Go to full version