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

help4bis

Registered
Feb 8, 2021
1
1
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:
  • Like
Reactions: SergievM

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
14,425
2,259
363
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.
 

SergievM

Member
May 23, 2021
7
0
1
GTA
cPanel Access Level
Website Owner
Hi,

I am trying to remove or change rights of some accounts within a domain Cpanel account. I'm having some difficulty with the user account menu. So I thought I could do it via the terminal?

I was told
Code:
ch mod
ch change
However, i don't know what would be the terminal comands:
  1. the search user command
  2. the list rights command
  3. the change command
  4. or delete user command

For a CentOS install. The object is that some users no longer have domain root access or FTP? Sorry, if this appears to be a trival questons.

Any and all suggestions are welcomed.

thanks,