WHM - CPanel Cannoy rearrange account - cpanel

Hello I have root access to my server through whm and I am trying to change the folder for one of the account domains. I researched and I think I have to rearrange the account so I went to rearrange the account section for that domain but it is not editable at all, how do I change the folder?

I'm not sure I quite understand your request but in order to do a rearrange of a cPanel account you need to do that from the WHM interface. In WHM you got to List Accounts, extend the cPanel account you want to re-arrange using the [+] sign and click on Change Disk Partition then select the new home partition for that account (could be /home, /home2 etc).

Related

Protect VPS,WHM,cPanel

Please guys help me, I want prevent my old developer from access to my VPS,WHM and cPanel what I should do. I don't want to lose my work.
I saw there is password for Virtuozzo Power Panel, WHM and cPanel there is my thing i need to change it.
like how I know if he have SSH access or not. or any recovery can he recover the passwords
If you have given Password, SSH and FTP access to your developer you can consider doing the following:
Change your WHM's root password
Change all of your cPanel accounts' passwords (or those that your
developer had access to, if he had access to the whole WHM - you
might want to change all passwords)
Make sure there aren't any authorized SSH keys for the root user.
This can be seen through WHM's interface, docs here
Make sure there aren't any authized SSH keys for any cPanel user as
well. This can be done through each cPanel account's SSH Access
tool
Check all cPanel accounts for unauthorized FTP accounts.
You can also take a look at the cron jobs that are running as well.
Ultimatively you should also consider looking for any backdoors that
might be present in the scripts that your developer was working on.

WHM and cPanel database and settings storing place

I'm trying to figure out where all WHM settings are stored. I got a task to prepare some template with WHM and cPanel installed but I can't find anywhere any information what is the name of the database where information (with settings) are stored.
I'm precisely looking for the option to turn on email notification in cPHulk about banned user IPs. I know that I can set it up later but I don't want to make any of initial setup in WHM/cPanel.
Is any chance to manually change this settings value ? (either in database or file).
I'm looking as well where are stored values for WHM option: "Show IP Address Usage"
By default, you can only preconfigure WHM using cpanel.config file as described in their docs: https://documentation.cpanel.net/display/1144Docs/The+cpanel.config+File
Unfortunately, this only covers 'Tweak Settings' section, so you can't preconfigure cPHulk using it. One of the alternatives would be to use WHM API and fire it after the server is installed. With this API you have way more options, e.g. cPHulk controls are there: https://documentation.cpanel.net/display/SDK/WHM+API+1+Functions+-+load_cphulk_config

How do I give SSH access to users for particular subdomains in cPanel

I am currently setting up a dev environment with multiple subdomains dom1.domain.net, dom2.domain.net, dom3.domain.net etc. and I would like to give different users SSH access to the individual subdomain directories in the file system. Some instances may allow more than one user access to the subdomain directory and some instances may allow one user to have access to multiple subdomain directories.
So, the question is: Is there a way for me to give multiple cPanel users SSH access per subdomain dir?
I tried to add a 'subdomain' account through WHM's 'Create account' but as expected it failed since the base domain already exists on the same server.
Anyone have any ideas? Point me in the right direction?
EDIT:
The reason for this setup is that I want to setup git for different subdomain enviroments and want to give users access only to the server projects directories they are concerned with.
If you have access to WHM you could just create individual cPanel accounts for each subdomains.
If you give access via SSH to a cpanel user, that user will have access to the main domain setup on the cPanel account and on all the subdomains created in that account. So in the end if you will have a cPanel user that can access 1-5-10 or whatever is the total of subdomains.
You can create multiple FTP accounts and associate them with subdomains but you won't be able to login via SSH with a FTP account.

How to disable root login on Virtualmin

I’m using a vanilla Webmin / Virtualmin 3.93 GPL version on Centos 6. I’ve created a new user that has full privileges on Webmin, so now I want to disallow root from logging in, as obviously it could be a security issue.
Does anyone know how to do this? There must be an option for this somewhere but maybe I can’t see the wood for the trees.
I’ve disabled root SSH login manually, but I still can login to Webmin using the root account.
Thanks to #Charles for the pointers.
To remove the root user from Webmin, log in as a user with administrator privileges and click on Webmin -> Webmin Users.
In the list of users, either delete or remove all privileges from the root user.
After removing that user I could log in as my new administrator user and administer the server but not log in as root.
Problem solved, security through obscurity but still better than nothing.
Click on the Webmin tab, expand the Webmin section and select Webmin User. Then select the root user. Expand Security and Limit Options and select Only allow from listed addresses for IP Access Control. Enter the loopback address(127.0.0.1) into the field. The root user will still exist, but will be unable to login.
In Webmin -> Webmin Users click root and rename it to the username you use.

Change the user account directory name in WHM

is there a way to change the directory name WHM assigns to new cPanel accounts? Right now, the directories are named by the first eight letters in the domain name. Could I change that somehow?
In WHM panel,Navigate to Account Functions on the left side of the screen and click on Modify an Account. Highlight the domain and click Modify.
Now you can change the username of the domain which will also change the directory name