BuycPanel Blog

BuycPanel Blog

Latest news and updates

2/23/2015 – Fixing GroupAdd or UserAdd Errors

Posted by Jamison on 23 02 2015.

Adding users can get problematic depending on what your requirements for users are and the kind of data you’re looking for. Redundancies and duplicate user accounts can also cause problems. Adding users one by one or by batch can also screw up a lot of cPanel’s functions.


But don’t fear, there are a lot of solutions available before you need to contact your system administrator or write up a support ticket. Here are some of the problems you can encounter and how to fix them:


Why do I receive the message “unable to add the user” when I create an account?


The user may already exist on your system. If this is the case, use your operating system’s user deletion tool to delete that user.


To check whether the user already exists, log in to your server and perform the following actions:


  • Check the /home/username directory for a home directory for that user.
  • Check the contents of the /etc/passwd directory for an entry for that user.


Does cPanel & WHM support multiple levels of permissions?


Yes. cPanel & WHM supports root users that can create and modify any domain and have access to all features of the cPanel & WHM interfaces.


We also support reseller accounts, which web hosting resellers can use to manage their own customer’s accounts. However, you can easily tweak reseller access so that they only have privileges to suspend or unsuspend domains. Resellers have access to the cPanel interface and a limited subset of the functionality of the WHM interface.


Hosting account owners have an account in the cPanel interface and can manage most aspects of a website by themselves (within the boundaries that the reseller or root user sets).



Why do I receive groupadd or useradd errors when I attempt to create a new account?


To ensure that the /etc/passwd and /etc/group files do not include the +i (immutable) flag, run the  lsattr /etc/group  and  lsattr /etc/shadow commands.


If these files do not contain the flag, run the following commands:




chattr -i /etc/passwd

chattr -i /etc/group


It is also possible that your group shadow file is corrupt. To fix this issue, perform the following steps:


  1. Move the /etc/gshadow file to the /etc/gshadow.corrupted file.
  2. Run the grpconv command to rebuild the file.
  3. Remove the grshadow.lock and group.lock files, if they are present.


How can I find out where all of a user’s files are?


If there is a discrepancy between quotas and the results of the du -sh /home/username command, that user’s UID may still own some other files on the system.


To find the location of all of a user’s files, perform the following steps:


  1. Run the find / -user username -ls command. The output is a long list of all of the files that the user owns.
  1. Redirect the output to a file to browse through later. You can chown the files to the root user rather than delete them.