Need to add a user in Directadmin thats already an existing system user

BooDaddy

Verified User
Joined
Feb 20, 2009
Messages
46
Hello all. I have setup my machine with a generic user account named boodaddy that i use for administration. (user has sudo and the like).

i would like to setup a domain in directadmin for this user (example: boodaddy.net). So, I logged into my reseller account on the system and attempted to add new user. I get the following error:
That username already exists on the system

I know there is something simple to remedy this, but how do I add an existing "system" user so that they are able to have domains in directadmin?

Thanks in advance!
 
It's not a big deal, if you're good with directadmin.
But if you're a fresher, you'd better create a new account, or delete the existing one.

I don't know, if there is any ready script for you.
You should create /usr/local/directadmin/data/users/boodaddy with it's structure and add «boodaddy» to resellers' list of users. Others files and directories can be re-created by DA scripts.
 
Last edited:
Hello all. I have setup my machine with a generic user account named boodaddy that i use for administration. (user has sudo and the like). i would like to setup a domain in directadmin for this user (example: boodaddy.net).
Log in as boodaddy and add the boodaddy.net as a domain?

I don't understand your question, I read it like you have boodaddy as an user already and you're trying to add the same user again?
 
As far as I understood, there's a system user boodaddy, that does not exist in Directadmin. The topic starter wishes to add this user into directadmin with the domain boodaddy.net.
 
zEitEr has it exactly correct.

The best way to describe my situation is this:

When I first setup this new server, I created a system user named boodaddy. I use this user for all system tasks. This user as sudo access, and a gnome desktop. It was actually the very first user that was created during the OS setup (besides root of course), and was created before DirectAdmin was even installed on the system.

Now, I have directadmin installed to manage all of the virtual hosts. This user boodaddy would like to host a domain like all of the other v-hosts onthe system. So, I tried to set up the user under one of my reseller accounts like would be done normally, but I get the error message "username already exists".

Now, I am guessing its because that user already exists in /etc/passwd that DA is giving the error, but I do not want to remove user boodaddy from the system just to add it back through DA.

I was hoping there was a way to add a user into DirectAdmin that already exists in the OS itself. I am running CentOS 5.5 by the way.
 
Ok, there's is a way out, I suppose.

1. Create account boodaddy2 with a fake domain.
2. Backup it from reseller.
3. Go to reseller's backup dir

Code:
cd /home/<reseller_name_here>/user_backups

4. Change a name for boodaddy2.tar.gz and set chmod

Code:
mv boodaddy2.tar.gz boodaddy.tar.gz
chmod 755 boodaddy.tar.gz

4.1 do

Code:
echo boodaddy >> /usr/local/directadmin/data/users/<reseller_name_here>/users.list

Copy directory

Code:
cp -R /usr/local/directadmin/data/users/boodaddy2 /usr/local/directadmin/data/users/boodaddy
chown -R diradmin:diradmin /usr/local/directadmin/data/users/boodaddy
chown root:ftp /usr/local/directadmin/data/users/boodaddy/ftp.passwd
perl -pi -e 's/boodaddy2/boodaddy/' /usr/local/directadmin/data/users/boodaddy/*

5. Delete account boodaddy2 from DA.

6. Via reseller backups system, restore user boodaddy.

7. Remove the fake domain. And add your valid domain.

8. Set chmod to /home/boodaddy

Code:
chmod 711 /home/boodaddy

9. Double check the password for boodaddy after all.

10. Ensure that SSH access is allowed in DA for boodaddy.

That should work. Do not create anything within the account, until you finish.
 
Last edited:
It's important to note that running xserver and a shell such as gnome, kde, etc., is not recommended for a webserver; there are a lot more possible exploits you need to look out for, and gnome (for example) uses a lot of system resources.

If you really need to use boodaddy as a user name I'd simply rename the current user to something else (all good admins know how to rename a generic user, right :)) and then create a new user as boodaddy.

Hint: man usermod

Jeff
 
Back
Top