Ruby-talk.com Expired?

I use http://ruby-talk.com/# style links on the Ruby Quiz site and I just noticed that they have stopped working. Is ruby-talk.com expired? Will it be coming back? Thanks.

James Edward Gray II

Hi, I'm looking at creating md5 passwords in ruby then manually replacing the users pass in the /etc/shadow file. I unfortunately cannot use the ruby-password or ruby-termios libraries as they are not in the Debian-stable tree (long story).

I looked in the source for ruby-password and noticed that if the salt supplied for crypt is $1$, the returned string is an md5 digest. Unfortunately this does not work

crypt_pass = password.crypt("$1$as")

the resulting does not have enough chars

I also tried

crypt_pass = Digest::MD5.hexdigest(password)

This produces something a little closer to what I need, but if I manually replace someone's password with this string, it also does not work. Also, it appears to be 2 digits shorter than what /bin/passwd creates.

I've searched high and low for a few days now, and haven't been able to come up with anything online.

Does anybody have any ideas?

-Chris

James Edward Gray II wrote:

I use http://ruby-talk.com/# style links on the Ruby Quiz site and I just noticed that they have stopped working. Is ruby-talk.com expired? Will it be coming back? Thanks.

James Edward Gray II

whois ruby-talk.com

[...]

Creation date: 21 Feb 2001 18:47:14
Expiration date: 21 Feb 2005 18:47:14

Would appear so.

···

--
Alan Garrison
Cronosys, LLC <http://www.cronosys.com>
Phone: 216-221-4600 ext 308

My apologies. I should have announced this. Use ruby-talk.org and
everything should work as it used to. We chose not to renew all of
the redundant domains we had.

···

On Fri, 25 Feb 2005 04:09:42 +0900, James Edward Gray II <james@grayproductions.net> wrote:

I use http://ruby-talk.com/# style links on the Ruby Quiz site and I
just noticed that they have stopped working. Is ruby-talk.com expired?
  Will it be coming back? Thanks.

James Edward Gray II

--

Chad Fowler
http://chadfowler.com

http://rubygems.rubyforge.org (over 100,000 gems served!)

Chris Mueller wrote:

Hi, I'm looking at creating md5 passwords in ruby then manually replacing the users pass in the /etc/shadow file. I unfortunately cannot use the ruby-password or ruby-termios libraries as they are not in the Debian-stable tree (long story).

I looked in the source for ruby-password and noticed that if the salt supplied for crypt is $1$, the returned string is an md5 digest. Unfortunately this does not work

crypt_pass = password.crypt("$1$as")

the resulting does not have enough chars

I also tried

crypt_pass = Digest::MD5.hexdigest(password)

This produces something a little closer to what I need, but if I manually replace someone's password with this string, it also does not work. Also, it appears to be 2 digits shorter than what /bin/passwd creates.

I've searched high and low for a few days now, and haven't been able to come up with anything online.

Does anybody have any ideas?

-Chris

The salt is not only $1$, $1$ is used by crypt system call to say to use MD5 instead of DES.
The salt is $1$ plus 8 bytes and an optional $ ending char, something like:

$1$abcdefgh$........................ rest of the encrypted password.

/etc/shadow have this format
try man crypt

STOP! STOP creating new threads by hitting reply to an existing message and changing the subject!

Chad Fowler wrote:

[snipped all content]

Chad Fowler
http://chadfowler.com
http://rubycentral.org
http://rubygarden.org
http://rubygems.rubyforge.org (over 100,000 gems served!)

Hey... I like this!

We need to have a public celebration when at each order of magnitude! I'm
rooting for 1 million by the end of the year!

Curt

Can you show me your output?

It works for me:

[ianmacd@foobar]$ irb
irb(main):001:0> require 'password'
=> true
irb(main):002:0> "foo".crypt('$1$abcdefgh')
=> "$1$abcdefgh$XxzGe9Muun7wTYbZO4sdr0"

A smaller salt works, too:

irb(main):003:0> "foo".crypt('$1$ab')
=> "$1$ab$KdoFYgkGJOZ629oOkVUuD."

Ian

···

On Fri 25 Feb 2005 at 04:28:17 +0900, Chris Mueller wrote:

Hi, I'm looking at creating md5 passwords in ruby then manually
replacing the users pass in the /etc/shadow file. I unfortunately cannot
use the ruby-password or ruby-termios libraries as they are not in the
Debian-stable tree (long story).

I looked in the source for ruby-password and noticed that if the salt
supplied for crypt is $1$, the returned string is an md5 digest.
Unfortunately this does not work

crypt_pass = password.crypt("$1$as")

the resulting does not have enough chars

--
Ian Macdonald | Learn from other people's mistakes, you
System Administrator | don't have time to make your own.
ian@caliban.org |
http://www.caliban.org |
                            >

On Fri, 25 Feb 2005, Ian Macdonald defenestrated me:

Can you show me your output?

It works for me:

[ianmacd@foobar]$ irb
irb(main):001:0> require 'password'
=> true
irb(main):002:0> "foo".crypt('$1$abcdefgh')
=> "$1$abcdefgh$XxzGe9Muun7wTYbZO4sdr0"

A smaller salt works, too:

irb(main):003:0> "foo".crypt('$1$ab')
=> "$1$ab$KdoFYgkGJOZ629oOkVUuD."

  Should they both output the same length digest (128 bit)?
Your second one looks a little short...

-Tom

···

--
+ http://www.tc.umn.edu/~enebo +---- mailto:enebo@acm.org ----+

Thomas E Enebo, Protagonist | "A word is worth a thousand |
                             > pictures" -Bruce Tognazzini |

tells you a lot about the quality of the mail clients most
people here use. a good client not only has a good auto inserting
addressbook making mails to the mailing list easy, but also probably
has useful completion for To: addresses, and on this particular
client i just client on the To: in a message itself and click
"new message", difficult huh? wtf is wrong with oss clients?
actually a more appropriate question would be.
why do people use such LAME clients??
</rant>

Alex

···

On Feb 24, 2005, at 9:21 PM, Ryan Davis wrote:

STOP! STOP creating new threads by hitting reply to an existing message and changing the subject!

Yea!!! We have more to cheer about right now, too. More details this
weekend (when I'm not in the office) :slight_smile:

···

On Fri, 25 Feb 2005 05:55:50 +0900, Curt Hibbs <curt@hibbs.com> wrote:

Chad Fowler wrote:

[snipped all content]

> Chad Fowler
> http://chadfowler.com
> http://rubycentral.org
> http://rubygarden.org
> http://rubygems.rubyforge.org (over 100,000 gems served!)

Hey... I like this!

We need to have a public celebration when at each order of magnitude! I'm
rooting for 1 million by the end of the year!

--

Chad Fowler
http://chadfowler.com

http://rubygems.rubyforge.org (over 100,000 gems served!)

On Fri, 25 Feb 2005, Thomas E Enebo defenestrated me:

On Fri, 25 Feb 2005, Ian Macdonald defenestrated me:
>
> Can you show me your output?
>
> It works for me:
>
> [ianmacd@foobar]$ irb
> irb(main):001:0> require 'password'
> => true
> irb(main):002:0> "foo".crypt('$1$abcdefgh')
> => "$1$abcdefgh$XxzGe9Muun7wTYbZO4sdr0"
>
> A smaller salt works, too:
>
> irb(main):003:0> "foo".crypt('$1$ab')
> => "$1$ab$KdoFYgkGJOZ629oOkVUuD."

  Should they both output the same length digest (128 bit)?
Your second one looks a little short...

  Whoops I just noticed this is prepending the salt :slight_smile:
Nevermind....

-Tom

···

--
+ http://www.tc.umn.edu/~enebo +---- mailto:enebo@acm.org ----+

Thomas E Enebo, Protagonist | "A word is worth a thousand |
                             > pictures" -Bruce Tognazzini |

Yea!!! We have more to cheer about right now, too. More details this
weekend (when I'm not in the office) :slight_smile:

Sounds intriguing ...