Create user in DirectAdmin








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 Ibmi Media, as part of our Server Management Services, we regularly help our Customers to create a user in the DirectAdmin account and also fix related errors.

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:

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 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


[Need urgent assistance in creating a user in DirectAdmin? – We'll help you with it. ]



Conclusion

This article will guide you on how we can create a #user in DirectAdmin and fix errors related to it. 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. 

#DirectAdmin can be accessed at http://server.ip.address:2222. 

Use the Admin username/password from the output information provided by setup.sh (the same information is specified in the /usr/local/directadmin/scripts/setup.

To install Direct Admin:

1. Set a main #domain name. By default, no web #site is associated with your server.

2. Create nameservers (optional) Add at least one additional IP address to your sever.

3. Set your e-mail address in the control panel.


For Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on LinuxAPT.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com