ruby-talk.com Expired?

  • Thread starter James Edward Gray II
  • Start date
J

James Edward Gray II

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
 
C

Chris Mueller

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
 
J

Javier Valencia

Chris said:
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
 
A

Alan Garrison

James said:
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.
 
C

Chad Fowler

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

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.

--

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

Ryan Davis

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

Ian Macdonald

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

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
--
Ian Macdonald | Learn from other people's mistakes, you
System Administrator | don't have time to make your own.
(e-mail address removed) |
http://www.caliban.org |
|
 
T

Thomas E Enebo

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
 
T

Thomas E Enebo

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 :)
Nevermind....

-Tom
 
A

Alexander Kellett

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

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
 
C

Chad Fowler

Chad Fowler wrote:

[snipped all content]

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!

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

--

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,169
Messages
2,570,918
Members
47,458
Latest member
Chris#

Latest Threads

Top