Re: Generate hashed rootpw for native ldapd

2014-02-22 Thread Claudio Jeker
On Fri, Feb 21, 2014 at 10:45:29AM -0600, Matthew Weigel wrote: > On 2014-02-21 9:24, Matthew Weigel wrote: > >On 2014-02-21 5:09, Joel Carnat wrote: > > > >Here is a short > >script that should run fine on a stock OpenBSD machine to generate a > >bcrypt hash suitable for the userPassword attribute

Re: Generate hashed rootpw for native ldapd

2014-02-21 Thread Theo de Raadt
> > I guess you can use 'openssl passwd' for that, > > or 'openssl passwd -1' for MD5 password > > however that is tagged if allowed in LDAP... > > It doesn't look like openssl passwd knows about bcrypt at all (either > internally, or via crypt()). While I think ldapd would be fine with > eithe

Re: Generate hashed rootpw for native ldapd

2014-02-21 Thread Matthew Weigel
On 2014-02-21 10:07, Raimo Niskanen wrote: I guess you can use 'openssl passwd' for that, or 'openssl passwd -1' for MD5 password however that is tagged if allowed in LDAP... It doesn't look like openssl passwd knows about bcrypt at all (either internally, or via crypt()). While I think ldap

Re: Generate hashed rootpw for native ldapd

2014-02-21 Thread Raimo Niskanen
On Fri, Feb 21, 2014 at 09:24:10AM -0600, Matthew Weigel wrote: > On 2014-02-21 5:09, Joel Carnat wrote: > > >What is the (native) way to generate the "SSHA" hashed format for > >rootpw ? > > Is there a particular reason you want to use SSHA? Here is a short > script that should run fine on a

Re: Generate hashed rootpw for native ldapd

2014-02-21 Thread Matthew Weigel
On 2014-02-21 9:24, Matthew Weigel wrote: On 2014-02-21 5:09, Joel Carnat wrote: Here is a short script that should run fine on a stock OpenBSD machine to generate a bcrypt hash suitable for the userPassword attribute of ldapd. Nope nope nope. That script is incorrect in a couple of ways. Mo

Re: Generate hashed rootpw for native ldapd

2014-02-21 Thread Matthew Weigel
On 2014-02-21 5:09, Joel Carnat wrote: What is the (native) way to generate the "SSHA" hashed format for rootpw ? Is there a particular reason you want to use SSHA? Here is a short script that should run fine on a stock OpenBSD machine to generate a bcrypt hash suitable for the userPassword

Re: Generate hashed rootpw for native ldapd

2014-02-21 Thread Sébastien Marie
On Fri, Feb 21, 2014 at 01:31:13PM +0100, Joel Carnat wrote: > Hum, I tried it but it doesn't work. > > I have a slappasswd else where to test. And here's what I get : > # print passphrase | openssl dgst -sha1 -binary | openssl enc -base64 | awk > '{print "{SHA}"$0}' > {SHA}ZLvhLmLU88dUQwzfUgsq6I

Re: Generate hashed rootpw for native ldapd

2014-02-21 Thread Claudio Jeker
On Fri, Feb 21, 2014 at 01:31:13PM +0100, Joel Carnat wrote: > Hum, I tried it but it doesn't work. > > I have a slappasswd else where to test. And here's what I get : > # print passphrase | openssl dgst -sha1 -binary | openssl enc -base64 | awk > '{print "{SHA}"$0}' > {SHA}ZLvhLmLU88dUQwzfUgsq6I

Re: Generate hashed rootpw for native ldapd

2014-02-21 Thread Joel Carnat
Yep, that works! Thanks :) Le 21 févr. 2014 à 13:41, Abel Abraham Camarillo Ojeda a écrit : > try not including newline: > > $ echo -n passphrase | openssl dgst -sha1 -binary | openssl enc > -base64 | awk '{print "{SHA}"$0}' > {SHA}YhAnRDQFLyD8uD4dD0kiBPyxGIQ= > $ > > > On Fri, Feb 21, 2014

Re: Generate hashed rootpw for native ldapd

2014-02-21 Thread Abel Abraham Camarillo Ojeda
try not including newline: $ echo -n passphrase | openssl dgst -sha1 -binary | openssl enc -base64 | awk '{print "{SHA}"$0}' {SHA}YhAnRDQFLyD8uD4dD0kiBPyxGIQ= $ On Fri, Feb 21, 2014 at 6:31 AM, Joel Carnat wrote: > Hum, I tried it but it doesn't work. > > I have a slappasswd else where to test.

Re: Generate hashed rootpw for native ldapd

2014-02-21 Thread Joel Carnat
Hum, I tried it but it doesn't work. I have a slappasswd else where to test. And here's what I get : # print passphrase | openssl dgst -sha1 -binary | openssl enc -base64 | awk '{print "{SHA}"$0}' {SHA}ZLvhLmLU88dUQwzfUgsq6IV8ZRE= # echo passphrase | openssl dgst -sha1 -binary | openssl enc -base

Re: Generate hashed rootpw for native ldapd

2014-02-21 Thread Marcus MERIGHI
j...@carnat.net (Joel Carnat), 2014.02.21 (Fri) 12:09 (CET): > I want to generate a hashed rootpw for native ldapd (on OBSD 5.4). > I've tried various things like `echo secret | sha256` but I can't > authenticate. > > If possible, I'd like not to install openldap-server just to get slappasswd. >

Generate hashed rootpw for native ldapd

2014-02-21 Thread Joel Carnat
Hi, I want to generate a hashed rootpw for native ldapd (on OBSD 5.4). I've tried various things like `echo secret | sha256` but I can't authenticate. If possible, I'd like not to install openldap-server just to get slappasswd. What is the (native) way to generate the "SSHA" hashed format for ro