Domain user via shell, now I cannot remove the domain and user still shows in WHM

help4bis

Registered
Feb 8, 2021
1
0
1
queensland
cPanel Access Level
Root Administrator
Hi I made a mistake.


A user was deleted via centos remove user, now the user still shows in WHM with the associated domain.


I tried to remove the user by doing a user terminate via WHM but it tells me user does not exist... How do I remove the domain and user???

[2021-02-08 21:51:49 +1000] die [Internal Death while parsing [stdin] 15140] (XID 5rahhw) User with username “peertube” not found. at /usr/local/cpanel/Cpanel/Quota/Common.pm line 237.
Cpanel::Quota::Common::set_user(Cpanel::Quota::Common=HASH(0x2cac868), "peertube") called at /usr/local/cpanel/Cpanel/Quota/Common.pm line 78
Cpanel::Quota::Common::new("Cpanel::Quota::Common", HASH(0x2cac6a0)) called at /usr/local/cpanel/Cpanel/Quota.pm line 114
Cpanel::Quota::displayquota(HASH(0x2cb30f8)) called at whostmgr/bin/whostmgr.pl line 3860
main::edituser("edituser") called at /usr/local/cpanel/Whostmgr/Dispatch.pm line 274
Whostmgr::Dispatch::_do_call("edituser", HASH(0x2c88830), HASH(0x2c888d8)) called at /usr/local/cpanel/Whostmgr/Dispatch.pm line 172
Whostmgr::Dispatch::dispatch("edituser", 1, ARRAY(0x2c88ba8), HASH(0x2c888d8)) called at whostmgr/bin/whostmgr.pl line 535


Cpanel::Exception/(XID 5rahhw) User with username “peertube” not found.
at /usr/local/cpanel/Cpanel/Quota/Common.pm line 237.
Cpanel::Quota::Common::set_user(Cpanel::Quota::Common=HASH(0x2cac868), "peertube") called at /usr/local/cpanel/Cpanel/Quota/Common.pm line 78
Cpanel::Quota::Common::new("Cpanel::Quota::Common", HASH(0x2cac6a0)) called at /usr/local/cpanel/Cpanel/Quota.pm line 114
Cpanel::Quota::displayquota(HASH(0x2cb30f8)) called at whostmgr/bin/whostmgr.pl line 3860
main::edituser("edituser") called at /usr/local/cpanel/Whostmgr/Dispatch.pm line 274
Whostmgr::Dispatch::_do_call("edituser", HASH(0x2c88830), HASH(0x2c888d8)) called at /usr/local/cpanel/Whostmgr/Dispatch.pm line 172
Whostmgr::Dispatch::dispatch("edituser", 1, ARRAY(0x2c88ba8), HASH(0x2c888d8)) called at whostmgr/bin/whostmgr.pl line 535

Thanks
 
Last edited by a moderator:

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,151
525
273
cPanel Access Level
Root Administrator
Hey there! It might actually be easier to recreate the user in the operating system than to try and manually remove all the files on the system related to that account. The user would need to have the same UID and GID in order for cPanel to recognize that, so that may not be possible without restoring the /etc/passwd file on the system.

If that isn't possible, I'd recommend using the following tool to manually find the location of the cPanel user files and get those removed:

Code:
alias acctinfo="/usr/local/cpanel/3rdparty/bin/perl <(curl -s https://raw.githubusercontent.com/cPanelInc/tech-acctinfo/master/acctinfo)"
To use the tool once it is installed, just run this:

Code:
acctinfo cPanelUser
You can also use domain.com instead of cPanelUser, which you may need to do if the user doesn't exist.
 
  • Like
Reactions: andrewmoras