Jachgu

Member
Nov 19, 2006
8
0
151
Ok

2factor removal

So phone died (yes I know - I should have backups - and I do , but I cannot find this one)

I can get into server with root user through SSH

But I cannot seem to get whmapi1 twofactorauth_disable_policy to work

I get a need to be logged in as root error - BUT logged in as root

So just in case I try

sudo whmapi1 twofactorauth_disable_policy

But get the error

sudo: PERM_ROOT; setresuid(0, -1, -1): too many processes
 

Jachgu

Member
Nov 19, 2006
8
0
151
It seems its Shell Fork Bomb Protection that is not letting me get past - BUT no access to cpanel to change that. Any ideas
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
Hi @Jachgu

You can run the following perl one-liner to remove/install profile limits (Shell Fork Bomb Protection):

Enable Shell Fork Bomb protection:

Code:
/usr/local/cpanel/3rdparty/bin/perl526 -I /usr/local/cpanel -MCpanel::LoginProfile -le 'print [Cpanel::LoginProfile::install_profile('limits')]->[1];'
Disable Shell Fork Bomb protection
Code:
/usr/local/cpanel/3rdparty/bin/perl526 -I /usr/local/cpanel -MCpanel::LoginProfile -le 'print [Cpanel::LoginProfile::remove_profile('limits')]->[1];'
Either one of them run should be followed by:

Code:
/scripts/restartsrv_cpsrvd
Once Shell Fork Bomb Protection is disabled let us know if you have any issues with disabling 2fA

Thanks!
 

Jachgu

Member
Nov 19, 2006
8
0
151
Unfortunately it wont let me access that or use that - I cannot change to full root nor sudo - shell fork bomb limits to 35(ish) processes - so even when I reboot its starts up with to many processes. - not sure - might just be a loss