create a user in a second HD

winger

Verified User
Joined
Oct 5, 2004
Messages
176
Location
Rio de Janeiro - Brasil
hello,

how can I create a user account in a second hard disk?

I've found some informations in how to change the /home location but none in how to setup only one aco**** in another HD.

any help?

thanks!
 
are you talking about the /etc/httpd/conf/extra/ httpd-userdir.conf file?

if yes, I don't think so:

<Directory /home/*/public_html>
AllowOverride FileInfo AuthConfig Limit Indexes
Options -MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
 
Just creat the user normally through DA .. and then create a symbolic link to point the home directory of the user to another folder in the 2nd HDD with same permissions.

I use this why all the time and it's very easy and helpful
 
People what's wrong with you ? :)

How to do it in 5 easy steps:
1. create the user in /home/demouser
2. cp -r /home/demouser /hdd2/../..
3. Delete /home/demouser
4. ln -s /hdd2/path-to-demouser /home/demouser
5. Enable Quota on /hdd2/
 
Change user’s home directory
mkdir /home2/username # home2 being the second hard drive.
(cd /home/username;tar cf - *) | ( cd /home2/username; tar xfp -)
usermod -d /home2/username username
echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue

Reference from DirectAdmin Support http://www.directadmin.com/forum/showthread.php?p=182533
 
Does this manage mail properly as well? Johns post, back in 2003, was written before mail was stored in /home.

Someone needs to check and let us know, because /home is hardcoded in exim.conf and I don't see an easy way to change that.

Jeff
 
Does this manage mail properly as well? Johns post, back in 2003, was written before mail was stored in /home.

Someone needs to check and let us know, because /home is hardcoded in exim.conf and I don't see an easy way to change that.

Jeff
Stop trolololo, I just wrote in #11 how to do it. I also had couple of years ago one server and made the same as described in #11.
 
I just wrote in #11 how to do it.

And I wrote in post #12 another way to do it. Post #12 is based on the suggested method by the DirectAdmin staff. It is also my opinion that it is the better way to do it rather than faking it. Both ways are valid.

I don't know what trolololo is.
 
And I wrote in post #12 another way to do it. Post #12 is based on the suggested method by the DirectAdmin staff. It is also my opinion that it is the better way to do it rather than faking it. Both ways are valid.

I don't know what trolololo is.
LOL :) What do you mean be faking? You should read more about inodes and filesystems. No offence but your another way will not work normaly because of:
Someone needs to check and let us know, because /home is hardcoded in exim.conf and I don't see an easy way to change that.
And as I remember EXIM is not the only /home hardcoded thing. There are more.
 
What I mean by faking it is using the symbolic link. Some things will not follow symbolic links in certain situations.

Exim is a fair point and why Jeff brought it up. However they should not be hardcode that way. In my opinion that is wrong. Any application that uses the user's home directory should query the file (CentOS is /etc/passwd) that specifies what the user's home directory actually is.

But even if I am wrong about stuff that is no reason to act like I am stupid.
 
You should read about inodes and sylinks

Is there an echo in here?

I am sorry I cannot remember specific examples. Symlinks work for most things but I do know I have experiences where symlinks did not work. I do use symlinks but when I have a problem I know where to look first.

Large hard drives are so cheap now I do not even know why we have this thread. Just replace the hard drive and leave everybody's home directory under /home.
 
Just thought of one. tar the /home directory and instead of the users data on the second hard drive you will end up with just the symbolic link.
 
Back
Top