The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Change path for new users

Discussion in 'General Discussion' started by bihweb, Jun 12, 2004.

  1. bihweb

    bihweb Member

    Joined:
    Dec 20, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Hi all.
    I have recently added a new HD to the server and after that all new users that I make trough WHM are added to that new HD. I want to change it to the old HD. Where and how do I do that ?

    I have tried option Rearrange accounts. The problem is that new HD is mounted as the folder of the old one and it is password protected so in there I get the problem ( sorry there is only one harddrive in this machine )
     
  2. bihweb

    bihweb Member

    Joined:
    Dec 20, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    ANYONE ?


    PLEASE
     
  3. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    If the new hard drive is called anything with "home" in it, it will automatically be used if it has more space than the main home directory. To change this, you need to modify the "Home Directory Prefix:" in WHM's "Edit Setup".
     
  4. bihweb

    bihweb Member

    Joined:
    Dec 20, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Current Disk Usage
    Filesystem Size Used Avail Use% Mounted on
    /dev/hda2 7.7G 171M 7.2G 3% /
    /dev/hda1 76M 11M 62M 15% /boot
    /dev/hda8 84G 61G 20G 76% /home
    none 442M 0 442M 0% /dev/shm
    /dev/hda7 1012M 33M 928M 4% /tmp
    /dev/hda5 7.7G 263M 7.1G 4% /var
    /dev/hda6 7.7G 1.5G 5.9G 20% /usr
    /dev/hdd1 111G 77G 29G 74% /home/bosnamp3/public_html/MUZIKA/Muzika2
    /home/bosnamp3/public_html/MUZIKA

    ok here is the thing

    the one I want to assign all new users to is /dev/hda8 and they are currently all assigned to /dev/hdd1

    the problem with the solution you described that only thing that describes hda8 is home so what can I change home to then ?

    I am sorry but I am so scared to screw things up that I rather ask :)
     
  5. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    I didn't even think it's possible to have 2 home partitions, even if it is on 2 seperate drives. You need to change the second one to a different name. I think I know how to do that, but last time I made a change to my servers hard drive, I had to have my provider fix the damage, so I'm going to leave that for someone else to tell you how to do. To not use it for accounts, you do need to rename it. Maybe your server provider can do that.
     
  6. bihweb

    bihweb Member

    Joined:
    Dec 20, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    thanks for your advice :)

    I would love to be able to assign which dev to use manualy so that I wont have to rename them since everything else works just fine...
     
  7. bihweb

    bihweb Member

    Joined:
    Dec 20, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    If I rename one of them there would be much work in renaming paths in many many different places. This might be the proof that thinking before doing might save u some unnessecary brainstorming :) But if i understand things right the onl one that need to know where to create account is WHM and that value must be stored somewhere.

    hmmm 2 homes...
     
  8. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    Problem is, cpanel only goes by partition name.
     
  9. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    Here's a clip from the wwwacct script:
    Code:
    open(CONF,"/etc/wwwacct.conf") || deaderror "/etc/wwwacct.conf not found\n";
    while(<CONF>) {
    	$_ =~ s/\n//g;
    	if ($_ !~ /^;/) {
    		if ($_ =~ /HOMEDIR/) {
    			(undef,$homedir) = split(/ /, $_);
    		}
    		if ($_ =~ /MINUID /) {
    			(undef,$minuid) = split(/ /, $_);
    		}
    		if ($_ =~ /HOMEMATCH/) {
    			(undef,$homematch) = split(/ /, $_);
    		}
    
    Here's the part of the wwwacct.conf file that counts:
    Code:
    HOMEDIR /home
    HOMEMATCH home
    
     
Loading...

Share This Page