Remove a cpanel acount via terminal

SergievM

Member
May 23, 2021
5
0
1
Toronto
cPanel Access Level
Root Administrator
Hi,

With all the recent change in the UI for Cpanel it's been a bit hard to follow.

However, I would like to know how to remove an account or modify a domain user accounts for a cpanel account. (i.e. Not the domain account but the user accounts within a domain).

I noticed some changes with the users and privilideges such as FTP, etc and I would like to remove the missconfigured account via the terminal, since I can't do via cpanel admin users UI.
I was told something like
Code:
ch mod or ch change
would work but I didn't find much literature on it in in forums?

Would someone know to do this?

Thanks,
 
Last edited by a moderator:

SergievM

Member
May 23, 2021
5
0
1
Toronto
cPanel Access Level
Root Administrator
I believe it's a user account; however, it appears to work as a default-user domain account because if has FTP access? That's why I would rather get the terminal commands to remove or change it's rights.

Unfortunately, I posted a message twice about this. Sorry. I am glad you caught that.

Thanks,
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
6,068
775
313
cPanel Access Level
Root Administrator
Thanks for the additional details. Your best bet would be to use this API call to perform that work:

 

SergievM

Member
May 23, 2021
5
0
1
Toronto
cPanel Access Level
Root Administrator
Thanks for the reply, I read the documentation and looked at setting up an API however, if provided a caution which regards to an API can access features... Is it safe to use it? Also, Here are some screen shots of users I would like to remove from the user manager dashboard. I was told I don't need multiple users with FTP access.
 

Attachments

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
6,068
775
313
cPanel Access Level
Root Administrator
Since you are manually running the API from the command line, you don't need to worry about the access features. You're just running the command as root, with no tokens are access lists or anything that like.

I was told I don't need multiple users with FTP access.
Who told you that? It's very common to have multiple FTP users on a cPanel account.
 

SergievM

Member
May 23, 2021
5
0
1
Toronto
cPanel Access Level
Root Administrator
I've seen some user manager accounts with only one FTP accessible user. So when I saw multiple users on this account, I inquired with other domains and they don't have those accounts in the manager dashboard. So I can remove them via the terminal?
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
6,068
775
313
cPanel Access Level
Root Administrator
You can use that API call to remove them from the terminal, but there is no reason you are required to do so. For example, if you had an FTP user named "ftpuser" under "domain.com" you would run this command to remove that:

Code:
uapi --user=domain UserManager delete_user username='ftpuser' domain='domain.com'