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.
Here at Bobcares, we receive requests to create a user in the DirectAdmin account and also fix its related errors as a part of Server Management Services.
Today, let’s see how we can create a user and review a few common errors. Also, let’s see how our Support Engineers fix them.
How we 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.
Few common errors 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 Engineers fix this by creating a wrapper using the below commands:
cd /usr/sbin mv useradd useradd.orig nano useradd
Then, we enter the below code into the new useradd file
#!/bin/sh /usr/sbin/useradd.orig $@ RET=$? sleep 15; exit $RET;
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 engineers 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 Engineers executed the below command to check the permission of
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
[Need assistance in creating a user in DirectAdmin? – We’ll help you with it]
In short, DirectAdmin provides an easy way to create a user as a reseller. And the errors during its creation are mainly due to home directory unavailability or improper permissions or due to the disk being full. Today, we saw how we can create a user and fix errors related to it.