When trying to terminate/remove an account, the process fails with a similar error message as below: (USERNAME is the username of the account)
Collecting Domain Name and IP...Cpanel::Exception::UserNotFound/(XID duq42m) You do not have a user named “USERNAME”. at /usr/local/cpanel/Cpanel/Async/UserLock.pm line 100.
This suggest that some of the userdata associated with the account has been removed and as a result the account is in an unstable state. When userdata is missing from an account, none of the usual accounting functionalities are guaranteed to work. You can confirm the missing file with this:
/usr/local/cpanel/3rdparty/bin/perl <(curl -s https://raw.githubusercontent.com/cPanelInc/tech-acctinfo/master/acctinfo) --cruft USERNAME
You need to recreate the missing userdata and then attempt to remove the account again:
chown root:$USERNAME /var/cpanel/userdata/$USERNAME && chown 750 /var/cpanel/userdata/$USERNAME
/scripts/removeacct $USERNAME --force