Re: Encryption for gnatsd.user_access file
Milan Zamazal <[email protected]>
| Newsgroups | gmane.comp.bug-tracking.gnats.general |
|---|---|
| Message-ID | <[email protected]> |
>>>>> "BW" == Brad Wyman <[email protected]> writes: BW> I'm following the manual in that I type: BW> perl -e 'use Crypt::PasswdMD5 ; print BW> Crypt::PasswdMD5::unix_md5_crypt "abc123" , time() % 100000000' BW> It returns a string which I then add to the gnatsd.user_access BW> file such as: BW> brad:$1$THESTRINGHERE:edit BW> This however does not work as I am denied access. If I use: BW> brad:$0$abc123:edit BW> everything works. BW> I couple of specific things baffle me: 1) every time I run the BW> perl script I get a different string. This because you use a different seed each time, based on the current time. BW> 2) The example in the manual shows an entry of the format: BW> rickm:$1$92388623$D7ZIYikzTUqd./d0DTFrI.:edit BW> What is the numerical string between the two "$"? BW> i.e. $92388623$ It should be the salt. BW> Do I need to specify a particular seed to associate with my MD5 BW> password? No, you can use any seed. I believe (haven't checked) the following is correct, if such a password doesn't work and your operating system supports MD5 encryption, it might be a GNATS bug. $ python -c 'import crypt; print crypt.crypt("abc123","$1$somesalt")' $1$somesalt$cQgXrA5ywA0FFcScneVRH1 Regards, Milan Zamazal -- real programmer? don't get me started. if you need to hide your pathetic excuse for a carreer behind super-macho languages like C, C++, and/or Perl instead of writing clean, maintainable, efficient code, you aren't much of a real programmer in my view. -- Erik Naggum in comp.emacs