There's no real interface to the crypt() syscall through Bash that I
know of, however if you've got either perl or mysql command line you
can do something like: mysql -u <user> -h <host> -p <database> -e 'select encrypt("passwd", "$1$salt")' The $1$ specifies that it use MD5 if available. Remove this if you compiled on a system that doesn't support md5, since vpopmail won't use md5 either then. To find out if you're using md5, simply look at the password string of one of the existing accoutns, and if it begins with $1$ then you're using md5, otherwise its DES. You can also do perl -e 'print crypt("password", "$1$salt");' The same rules apply to the string being used as a salt. For more info see the MySQL manual available at www.mysql.com, or for the perl function see perldoc -f crypt. Hope that helps, Nick Harring Webley Systems Oliver Etzel - GoodnGo.COM (R) wrote: Hello, anybody here who knows how to generate a password that are stored by vpopmail in a sql database by a Unix commandline?OliverI don't remember exactly, but there is a function in mysql SQL that allows you to create a unix compatible MD5 password from the clear text. >From mysql documentation: ENCRYPT(str[,salt]) Encrypt str using the Unix crypt() system call. The salt argumentshould be astring with two characters. (As of MySQL Version 3.22.16, salt maybe longerthan two characters.) mysql> SELECT ENCRYPT("hello"); -> 'VxuFAJXVARROc' On Tuesday 28 October 2003 10:36 am, Oliver Etzel - GoodnGo.COM\(R\) wrote:Hello Peter, hello all, you wrote, that passwords are stored by vpopmail in a sql databaseby"..It's system crypt(3) function.." How can I generate it by a linux commandline? OliverHello Jacob, On Tuesday, October 28, 2003 at 3:43:41 AM you wrote (at leastinpart):what style of encryption does vpopmail implement on thepasswordsthat itstores in the sql db?The same it uses for .cdb files. Read the archive [1]. http://bluedot.net/mail/archive/list.php?f=2ITS MD5 by defaultWhat "ITS MD5"??? It's system crypt(3) function by default. And this one uses a MD5-based algorithm instead of "simple" DESifavailable and indicated by the chosen salt. But all this /is written down in the lists archive/. Guess why I advised to read it ... -- Best regards Peter Palmreuther Virginity is curable if detected early. |
- [vchkpw] password encryption cyko
- [vchkpw] Re: password encryption Peter Palmreuther
- Re: [vchkpw] Re: password encryp... Jacob Mathew
- [vchkpw] Enable learn passwo... John Johnson
- [vchkpw] Re: password encryp... Peter Palmreuther
- Re: [vchkpw] Re: passwor... Oliver Etzel - GoodnGo.COM \(R\)
- Re: [vchkpw] Re: pa... Ken Jones
- Re: [vchkpw] Re... Oliver Etzel - GoodnGo.COM \(R\)
- Re: [vchkpw... Nick Harring
- Re: [vchkpw] Re... Erik Bourget
- Re: [vchkpw] Enable learn pa... Tom Collins