View Full Version : Changing user homedir

01-24-2004, 05:31 PM
Does DA utilize /usr/sbin/adduser to create accounts?

I've edited /etc/adduser.conf so that the home directory is created in /usr/home instead of the default [/home].

Whenever I use adduser command to create a user, it creates the homedir under /usr/home/ like its supposed to... however, whenever I create a user with DA, it still creates it under /home/

Any information on this?

01-25-2004, 09:36 AM
I would recommend creating a symlink for /usr/home to /home, unless you needed both /usr/home and /home to be separate. I'm not sure if you could make such a change in DA without having to change it for each version.

01-25-2004, 12:17 PM
Hm, yes - that would work; however, the reason why I was asking this was because of this thread I found:


In there John states that DA uses the system itself to figure out the default home directory. Let's say if your primary drive is full and you need to add on another drive to become /home2 - You shouldn't have move everything from /home to /home2 and symlink. All you should have to do is switch the default home directory prefix to /home2 so that all new accounts are created in /home2 instead of /home

It seems in the thread linked above, DA utilizes /usr/sbin/adduser to create accounts - if this was a case for FreeBSD 5.1 then if I can manually use adduser to create a user and also place their home directory under /usr/home - then DA's account creation should follow suit. It appears that DA utilizes some other account creating function and I'd like to know how to go about getting this done.

DirectAdmin Support
01-25-2004, 12:49 PM

For FreeBSD, the following command is used:

/usr/sbin/pw useradd -n username -s /sbin/nologin -w no -h 0 -m
(password sent on stdinput).

To create the "default" configuration file with a new "home", I believe (untested) that you just run:

pw useradd -D -m -b /home2The -D is the important part the tells pw to create the default file. You can type "man pw" for more info on how to set this up.


01-25-2004, 03:27 PM
Learn something new everyday. I can see where that'd come in handy.