In the DirectAdmin account, it seems to be a simple task to create a user. However, errors might appear while creating this user.
Normally, the major reason behind these errors includes a missing home directory, a full home directory.
In this context, we shall look into how we can create a user and review a few common errors as well as its fixes.
Steps to create a user in DirectAdmin ?
DirectAdmin is one of the easiest Control Panels. It is popular because of its graphically designed control panel.
Now, let's see how we create a user in DirectAdmin account as a Reseller:
1. First, we log into the DirectAdmin account and click on the ‘Add New User’ option available.
2. Next, we insert the details to create a user
3. Then we hit the submit button
4. Finally, we return back to the reseller homepage to view the created user.
Fixes to Common errors encountered while creating a user in DirectAdmin ?
Errors are common and this can occur during the installation or creation of any user. Let's now take a look at different errors that occur during the user creation.
1. Cannot find a home directory
In some cases, the /home/username folder will not be created with correct permissions automatically after running the useradd program.
Or else there can be a delay after the program exists before the UID/GID values actually show up in the passwd file.
In this case of long sync delay, we can fix it by creating a wrapper around the useradd.
Our Support Experts fix this by creating a wrapper using the below commands:
mv useradd useradd.orig
Then, we enter the below code into the new useradd file:
Here, the sleep 15 is the 15-second delay. Then, we update the folder permissions using the command after saving the user wrapper:
chmod 755 useradd
2. Disk full
It is very important to make sure that the disk space of the server is all good. Sometimes, a full disk will create trouble in the server.
Recently, one of our customers approached us with the below error message:
Error creating User: useradd.orig: group 'xxxxx' does not exist
Cannot find a home directory after the system user creation for xxxxx
The home directory for xxxxx was not created.
On investigating the error, our Support Experts found that the disk space of the /home directory was full.
So we suggested removing any unwanted contents from the folder or increase the disk space in the server.
3. Incorrect Permissions
Right permission is a must for any file or folder to work. Any improper permissions will lead to errors. Similarly one of our customers experienced the below error message due to incorrect permissions:
Unix User created successfully
User's System Quotas set
User's data directory created successfully
Domains directory created successfully
Error Creating /home/USER/domains
Parent directory does not allow write, or one of the directories didn't allow search (execution) permission
Our Support Experts executed the below command to check the permission of '/home':
ls -ld /home
Through the output, we could confirm that it was improperly set. So we ran the below command to change the permissions:
chmod 755 home
Finally, this fixed the error