Re: [vchkpw] Massive Folders
There are a few different ways to do it depending on your backend, if you are using MySQL, then you can just update the mysql database with the user and password, leaving the maildir directory blank and it will automatically be updated when you pop into the account or sendmail to the account (really fast for creating 10K+ users). If you are using the cdb interface, then you will have to create the users using the vpopmail tools, which might take 5-15 minutes depending on the number of users, disk speeds, CPU etc. I have just written a script that would do a mysql update query to md5('password'); into the mysql database. However the problem appears to be that the passwords set by the vpasswd utility dont appear to be md5 in the same way that the mysql query with md5() function works? Is that correct? HTH, Rick
Re: [vchkpw] Massive Folders
Jimmy Stewpot wrote: I have just written a script that would do a mysql update query to md5('password'); into the mysql database. However the problem appears to be that the passwords set by the vpasswd utility dont appear to be md5 in the same way that the mysql query with md5() function works? Is that correct? Hi, Yes, that is correct. How are you running this script ? Is it a perl or php program ? You can create the correct md5 password in perl or php and then update the database with it. Regards, Rick
Re: [vchkpw] Massive Folders
Rick Macdougall wrote: Jimmy Stewpot wrote: I have just written a script that would do a mysql update query to md5('password'); into the mysql database. However the problem appears to be that the passwords set by the vpasswd utility dont appear to be md5 in the same way that the mysql query with md5() function works? Is that correct? Hi, Yes, that is correct. How are you running this script ? Is it a perl or php program ? You can create the correct md5 password in perl or php and then update the database with it. It appears as though the passwords all start with a $1 how do we go about creating the right md5sums for example with php? I keep getting b.s. information created and it will fail authentication. p.s. thanks for all the help. I really appreciate it. Regards, Rick
Re: [vchkpw] Massive Folders
Jimmy Stewpot wrote: Rick Macdougall wrote: Jimmy Stewpot wrote: I have just written a script that would do a mysql update query to md5('password'); into the mysql database. However the problem appears to be that the passwords set by the vpasswd utility dont appear to be md5 in the same way that the mysql query with md5() function works? Is that correct? Hi, Yes, that is correct. How are you running this script ? Is it a perl or php program ? You can create the correct md5 password in perl or php and then update the database with it. It appears as though the passwords all start with a $1 how do we go about creating the right md5sums for example with php? I keep getting b.s. information created and it will fail authentication. p.s. thanks for all the help. I really appreciate it. Hi, $encpass = crypt('password','$1$salthere$'); See http://ca.php.net/manual/en/function.crypt.php Regards, Rick
Re: [vchkpw] Massive Folders
Hi, $encpass = crypt('password','$1$salthere$'); Where does vpopmail keep the salt or how does that work in regards to the vpasswd utility etc? See http://ca.php.net/manual/en/function.crypt.php Regards, Rick
Re: [vchkpw] Massive Folders
Jimmy Stewpot wrote: Hi, $encpass = crypt('password','$1$salthere$'); Where does vpopmail keep the salt or how does that work in regards to the vpasswd utility etc? Hi, Vpopmail uses $1$ + random letters for the salt. The actual salt is not kept anywhere. #ifdef MD5_PASSWORDS salt[0] = '$'; salt[1] = '1'; salt[2] = '$'; salt[3] = randltr(); salt[4] = randltr(); salt[5] = randltr(); salt[6] = randltr(); salt[7] = randltr(); salt[8] = randltr(); salt[9] = randltr(); salt[10] = randltr(); salt[11] = 0; #else salt[0] = randltr(); salt[1] = randltr(); salt[2] = 0; #endif tmpstr = crypt(clearpass,salt); Regards, Rick
Re: [vchkpw] Massive Folders
Rick Macdougall wrote: Jimmy Stewpot wrote: Hello, It appears that the server has not created the users in a hash format. Is there any way to convert the format to a hash easily? Hi, Not without deleting and re-adding all the users I think. Do you know how vpopmail was configured and what version it is ? It appears as though there has been some sort of hack together. The mail store is in the /domain/all_users/Maildir/* The original mail store was moved over from a non vpopmail system and new accounts have not been created in the hash. Is there any easy way to migrate from large non vpopmail to vpopmail setups? I have been searching for tools to do this and have found very little. Regards, Rick
Re: [vchkpw] Massive Folders
Jimmy Stewpot wrote: Rick Macdougall wrote: Jimmy Stewpot wrote: Hello, It appears that the server has not created the users in a hash format. Is there any way to convert the format to a hash easily? Hi, Not without deleting and re-adding all the users I think. Do you know how vpopmail was configured and what version it is ? It appears as though there has been some sort of hack together. The mail store is in the /domain/all_users/Maildir/* The original mail store was moved over from a non vpopmail system and new accounts have not been created in the hash. Is there any easy way to migrate from large non vpopmail to vpopmail setups? I have been searching for tools to do this and have found very little. Hi, I've done it a few times (sendmail to vpopmail, 30K+ users) with scripts etc to create the new users using the vpopmail tools, then again using scripts to get their Maildir directories from vpopmail and then moving the mail over. I've never just moved over an existing mail store directly, since of course, it doesn't create the hashes correctly. There are a few different ways to do it depending on your backend, if you are using MySQL, then you can just update the mysql database with the user and password, leaving the maildir directory blank and it will automatically be updated when you pop into the account or sendmail to the account (really fast for creating 10K+ users). If you are using the cdb interface, then you will have to create the users using the vpopmail tools, which might take 5-15 minutes depending on the number of users, disk speeds, CPU etc. HTH, Rick
Re: [vchkpw] Massive Folders
Hi, I've done it a few times (sendmail to vpopmail, 30K+ users) with scripts etc to create the new users using the vpopmail tools, then again using scripts to get their Maildir directories from vpopmail and then moving the mail over. I've never just moved over an existing mail store directly, since of course, it doesn't create the hashes correctly. How do you extract the existing cdb database so that you can view it and then I can easily script it. Im just having problems with the cdb passwd file. There are a few different ways to do it depending on your backend, if you are using MySQL, then you can just update the mysql database with the user and password, leaving the maildir directory blank and it will automatically be updated when you pop into the account or sendmail to the account (really fast for creating 10K+ users). If you are using the cdb interface, then you will have to create the users using the vpopmail tools, which might take 5-15 minutes depending on the number of users, disk speeds, CPU etc. HTH, Rick
Re: [vchkpw] Massive Folders
Jimmy Stewpot wrote: Hi, I've done it a few times (sendmail to vpopmail, 30K+ users) with scripts etc to create the new users using the vpopmail tools, then again using scripts to get their Maildir directories from vpopmail and then moving the mail over. I've never just moved over an existing mail store directly, since of course, it doesn't create the hashes correctly. How do you extract the existing cdb database so that you can view it and then I can easily script it. Im just having problems with the cdb passwd file. Hi, There should be a plain text vpasswd file as well as a cdb vpasswd.cdb file. You should be able to easily parse the vpasswd file. Regards, Rick
Re: [vchkpw] Massive Folders
On Wednesday 27 Jul 2005 16:51, Jimmy Stewpot wrote: Hi, I've done it a few times (sendmail to vpopmail, 30K+ users) with scripts etc to create the new users using the vpopmail tools, then again using scripts to get their Maildir directories from vpopmail and then moving the mail over. I've never just moved over an existing mail store directly, since of course, it doesn't create the hashes correctly. How do you extract the existing cdb database so that you can view it and then I can easily script it. Im just having problems with the cdb passwd file. You might find what you want on http://cr.yp.to/cdb.html I just tried cat vpasswd.cdb | cdbdump dump.txt dump.txt looks parseable to me. There are a few different ways to do it depending on your backend, if you are using MySQL, then you can just update the mysql database with the user and password, leaving the maildir directory blank and it will automatically be updated when you pop into the account or sendmail to the account (really fast for creating 10K+ users). If you are using the cdb interface, then you will have to create the users using the vpopmail tools, which might take 5-15 minutes depending on the number of users, disk speeds, CPU etc. HTH, Rick -- - Bob Hutchinson Midwales dot com -
[vchkpw] Massive Folders
Hello, I am managing a group of servers that is running Redhat Enterprise Linux v3. The Issue that I have just discovered is that we have now over 32000 users. Thats causing a problem as ext3 file system does not support more than 32000 folders in any one particular folder. Is there any way to setup vpopmail so that it supports directory hashes or anything similar to that. Does anyone have any solutions to resolve this type of issue. Regards, Jimmy.
Re: [vchkpw] Massive Folders
Jimmy Stewpot wrote: Hello, I am managing a group of servers that is running Redhat Enterprise Linux v3. The Issue that I have just discovered is that we have now over 32000 users. Thats causing a problem as ext3 file system does not support more than 32000 folders in any one particular folder. Is there any way to setup vpopmail so that it supports directory hashes or anything similar to that. Does anyone have any solutions to resolve this type of issue. Hi, By default vpopmail does do directory hashing. IE you should have something like this for users. user1 home = ~vpopmail/domains/domain.com/user1 user200 home = ~vpopmail/domains/domain.com/0/user200 user400 home = ~vpopmail/domains/domain.com/Z/user400 etc. Is this not what you are seeing ? Regards, Rick
Re: [vchkpw] Massive Folders
Hello, It appears that the server has not created the users in a hash format. Is there any way to convert the format to a hash easily? Regards, Jimmy Rick Macdougall wrote: Jimmy Stewpot wrote: Hello, I am managing a group of servers that is running Redhat Enterprise Linux v3. The Issue that I have just discovered is that we have now over 32000 users. Thats causing a problem as ext3 file system does not support more than 32000 folders in any one particular folder. Is there any way to setup vpopmail so that it supports directory hashes or anything similar to that. Does anyone have any solutions to resolve this type of issue. Hi, By default vpopmail does do directory hashing. IE you should have something like this for users. user1 home = ~vpopmail/domains/domain.com/user1 user200 home = ~vpopmail/domains/domain.com/0/user200 user400 home = ~vpopmail/domains/domain.com/Z/user400 etc. Is this not what you are seeing ? Regards, Rick
Re: [vchkpw] Massive Folders
Jimmy Stewpot wrote: Hello, It appears that the server has not created the users in a hash format. Is there any way to convert the format to a hash easily? Hi, Not without deleting and re-adding all the users I think. Do you know how vpopmail was configured and what version it is ? Regards, Rick