public inbox for gnats-devel@sourceware.org
 help / color / mirror / Atom feed
* Encryption for gnatsd.user_access file
@ 2003-08-09  2:48 Brad Wyman
  2003-08-20  9:23 ` Milan Zamazal
  0 siblings, 1 reply; 2+ messages in thread
From: Brad Wyman @ 2003-08-09  2:48 UTC (permalink / raw)
  To: help-gnats


This one has me perplexed.  I'm trying to use md5 encryption for the passwords in the gnatsd.user_access files.

I'm following the manual in that I type:

perl -e 'use Crypt::PasswdMD5 ; print Crypt::PasswdMD5::unix_md5_crypt "abc123" , time() % 100000000'

It returns a string which I then add to the gnatsd.user_access file such as:

brad:$1$THESTRINGHERE:edit

This however does not work as I am denied access.  If I use:

brad:$0$abc123:edit 

everything works.

I couple of specific things baffle me:
1) every time I run the perl script I get a different string.
2) The example in the manual shows an entry of the format:

rickm:$1$92388623$D7ZIYikzTUqd./d0DTFrI.:edit

What is the numerical string between the two "$"? i.e. $92388623$

Do I need to specify a particular seed to associate with my MD5 password?

I'm working with gnats 3.999.2 

Much thanks,

Brad Wyman


_______________________________________________
Help-gnats mailing list
Help-gnats@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnats

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Encryption for gnatsd.user_access file
  2003-08-09  2:48 Encryption for gnatsd.user_access file Brad Wyman
@ 2003-08-20  9:23 ` Milan Zamazal
  0 siblings, 0 replies; 2+ messages in thread
From: Milan Zamazal @ 2003-08-20  9:23 UTC (permalink / raw)
  To: Brad Wyman; +Cc: help-gnats

>>>>> "BW" == Brad Wyman <bwyman@burdettemedical.com> 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


_______________________________________________
Help-gnats mailing list
Help-gnats@gnu.org
http://mail.gnu.org/mailman/listinfo/help-gnats

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-08-18  8:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-09  2:48 Encryption for gnatsd.user_access file Brad Wyman
2003-08-20  9:23 ` Milan Zamazal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).