WHM command line config changes
Hi,
I am trying to automate certain cPanel config changes using chef via command line and require the below to be done but I am unsure where and if I do them correctly:
1. Disable root login to pure-ftp:
Create /var/cpanel/conf/pureftpd/root_password_disabled
Modify /var/cpanel/conf/pureftpd/main and set RootPassLogins: 'no'
Run /scripts/ftpupdate and /scripts/setupftpserver pure-ftpd
2. Max hourly emails per domain and disable boxtrapper
Set /etc/email_send_limits to:
Set skipboxtrapper=1 in /var/cpanel/cpanel.config Rebuild exim conf with /scripts/buildeximconf 3. Disable Reset Password for cPanel accounts and Reset Password for Subaccounts I have set resetpass_sub=0 and resetpass=0 in /var/cpanel/cpanel.config but I can also see that Post actions are required as well: Processing post action for Reset Password for Subaccounts Processing post action for Reset Password for cPanel accounts Any ideas what are the post actions required? Also amd I doing it correctly at 1 and 2? Anything else required? Please help. Thanks in advance.
#version 1.0
#format DOMAIN: MAX_EMAIL_PER_HOUR,MAX_DEFER_FAIL_PERCENTAGE,MIN_DEFER_FAIL_TO_TRIGGER_PROTECTION
*: 100,0,5
Set skipboxtrapper=1 in /var/cpanel/cpanel.config Rebuild exim conf with /scripts/buildeximconf 3. Disable Reset Password for cPanel accounts and Reset Password for Subaccounts I have set resetpass_sub=0 and resetpass=0 in /var/cpanel/cpanel.config but I can also see that Post actions are required as well: Processing post action for Reset Password for Subaccounts Processing post action for Reset Password for cPanel accounts Any ideas what are the post actions required? Also amd I doing it correctly at 1 and 2? Anything else required? Please help. Thanks in advance.
-
Hi, Are you doing these actions on a new install? 0 -
Yes, I am doing on a sandbox with new install but eventually I will want to do it on servers with existing accounts 0 -
Hello @izghitu, . Disable root login to pure-ftp: Create /var/cpanel/conf/pureftpd/root_password_disabled Modify /var/cpanel/conf/pureftpd/main and set RootPassLogins: 'no' Run /scripts/ftpupdate and /scripts/setupftpserver pure-ftpd
You could use the following commands based on the procedure from our
. Max hourly emails per domain and disable boxtrapper Set /etc/email_send_limits to:
#version 1.0 #format DOMAIN: MAX_EMAIL_PER_HOUR,MAX_DEFER_FAIL_PERCENTAGE,MIN_DEFER_FAIL_TO_TRIGGER_PROTECTION *: 100,0,5
Set skipboxtrapper=1 in /var/cpanel/cpanel.config Rebuild exim conf with /scripts/buildeximconf 3. Disable Reset Password for cPanel accounts and Reset Password for Subaccounts I have set resetpass_sub=0 and resetpass=0 in /var/cpanel/cpanel.config but I can also see that Post actions are required as well: Processing post action for Reset Password for Subaccounts Processing post action for Reset Password for cPanel accounts
You can configure these values before the installation using the instructions at: Installation Guide - Customize Your Installation - Version 64 Documentation - cPanel Documentation No additional actions are required when using this method. On existing installations, you can utilize the following WHM API 1 function: WHM API 1 Functions - set_tweaksetting - Software Development Kit - cPanel Documentation Thank you.0 -
Hello @izghitu, You could use the following commands based on the procedure from our
You can configure these values before the installation using the instructions at: Thank you.
Hi Michael, Thank you for your reply. I have tried the api command line command as per documentation like below:[root@ip-172-31-6-154 home]# whmapi1 set_tweaksetting key=maxemailsperhour value=201 --- metadata: command: set_tweaksetting reason: OK result: 1 version: 1
But nothing changed other than getting that response and the value from cpanel.config. The email_send_limits file is still showing default values.[root@ip-172-31-6-154 home]# cat /etc/email_send_limits #version 1.0 #format DOMAIN: MAX_EMAIL_PER_HOUR,MAX_DEFER_FAIL_PERCENTAGE,MIN_DEFER_FAIL_TO_TRIGGER_PROTECTION *: 0,0,5
The same goes for resetpass_sub and resetpass. If I set them to 0 then no post actions are being executed and no services are being reloaded. Just confirmation messages that the change in cpanel.config was successful. Do I need to do something else or am I doing it wrong? Please advise. Thanks0 -
Hello, Could you open a support ticket using the link in my signature so we can take a closer look and open an internal case if necessary? Thank you. 0 -
Hi, So the command I was looking for to run after the whmapi1 for max emails per hour was: /scripts/updateuserdomains If anyone needs it for the future. 0
Please sign in to leave a comment.
Comments
6 comments