On Tue, 26 Oct 2004, Thomas T. Veldhouse wrote:
> Thanks.  It turns out what I needed was actually something different.  I 
> needed the output of the crypt function, and for that, I used perl :-)
> 
> perl -le 'print crypt("password", "ab");'
> 
> where "ab" are any two random characters.
> 
> [veldy at fuggle veldy]$ perl -le 'print crypt("password", "ab");'
> abJnggxhB/yWI

 You're generating the salt (the two random characters) dynamically, 
right?  I usually use something like:

srand($$|time);
$salt = join('', ('.', '/', 0..9, 'A'..'Z', 'a'..'z')[rand 64, rand 64]);
$epasswd = crypt($ascii_passwd, $salt);

 That's part of a larger script, of course (which I can provide if 
requested).  I also don't advise typing the password on the command line; 
it'll usually end up in your history file, which could be a security 
issue.

     Jima


_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
Help beta test TCLUG's potential new home: http://plone.mn-linux.org
Got pictures for TCLUG? Beta test http://plone.mn-linux.org/gallery
tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list