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
[vchkpw] Re: Apache and qmail (with vpopmail) account in the same directory
Hello Adi, On Wednesday, July 27, 2005 at 4:44:11 PM Adi wrote: Everything is possible, but I think you'd better switch Apache's DocumentRoot to (let's say) /home/vpopmail/domains/blabla/htdocs/ than to modify vpopmail's default locations. Why? Well, assuming he has an already established, up and running setup, I think it's easier to move existing www directories than to move the existing virtual mail domains. For example, on a running system it's quite handy (IMO) to restart Apache with a modified configuration for virtual hosts and test the changes, instead of playing with the email system. Confirmed this is most probably right, shouldn't the decision not be what's easier now to change but better what's the necessity behind this change? What if I've already set up additional to Apache vpopmail a ProFTPD which authenticates virtual users against a database and uses their home directory somewhere within these several htdocs? And/or if there are already scripts that assume file locations in one/some of the htdocs-dirs? Or a lot of other possibilities that show a dependency on old htdocs-directories? Or if 'htdocs' are located on a partition with far more disk space available (because domains might host a *very* lot of / very big files) and vpopmail is on a smaller one, that might not be big enough for vpopmail *and* htdocs (while the other one is). That would *maybe* make it easier to migrate vpopmail-domains to the new location, wouldn't it? Don't get me wrong, I don't intend to say this is the case anytime, anywhere. I just think it is *not* _better_ to switch Apaches DocumentRoot, but it is just *one* possible way that *might* end up in lesser work to do. *MIGHT*, if circumstances are good. So we should be careful with advises what's better or worse, unless we know all the facts. I think we should concentrate on advises *what's possible* and let decide the originator to decide what's better (or ask again about that ;-) ). As always: no offense intended ;-) -- Best regards Peter Palmreuther The Delta-United Ring Formation Theory states that the rings of Saturn are composed entirely of lost airline luggage.
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