<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 05/11/2014 01:27 PM, James wrote:<br>
    </div>
    <blockquote cite="mid:1399829259.12254.64.camel@freed" type="cite">
      <pre wrap="">Hi #freeipa,

I'm working on improving my puppet-ipa module...
One area I'm working on is "better password management"...

In any case, here's the problem:

I want to give the script the ability to change it. The easy way to do
this is to compare what it is currently, to what it is set to. As I'm
assuming it's hashed, you have to compare hashes, IOW:

/usr/bin/test `hashed(somepass)` = `function_lookup_hash()`</pre>
    </blockquote>
    <br>
    This is scary.<br>
    This means that you expecting to have a hash being stored somewhere
    else outside the DS.<br>
    <br>
    Can you describe the workflow?<br>
    You want to be able to reset the admin password, right?<br>
    How do you bind? Using same admin password? Or keytab?<br>
    <br>
    <br>
    <blockquote cite="mid:1399829259.12254.64.camel@freed" type="cite">
      <pre wrap="">

Assuming the admin password is stored as a deterministic hash, I need
two things:

1) To know how to run the hashing function manually (say from python)
2) To know how to lookup the stored hash manually (say from python)

Thanks to ab (#freeipa), I know how to set the admin password:

# split by the periods!
$domain_split = split("${valid_domain}", '\.')

# add dc= to each array element
$prefix = prefix($domain_split, 'dc=')
$suffix = join($prefix, ',')                    # eg: dc=example,dc=com

$socket_realm = regsubst("${valid_realm}", '\.', '-', 'G')
$ldapuri = "ldapi://%2fvar%2frun%2fslapd-${socket_realm}.socket"

$admin_password_change = "/usr/bin/ldappasswd -Y EXTERNAL -s `
${admin_password_exec}` -H ${ldapuri} uid=admin,cn=users,cn=accounts,
${suffix}"

I also have the same question for the DM password, however I don't yet
know how to set it. If someone has a script for that, I'd love that too!

Thanks again!
James

</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Freeipa-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Freeipa-devel@redhat.com">Freeipa-devel@redhat.com</a>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/freeipa-devel">https://www.redhat.com/mailman/listinfo/freeipa-devel</a></pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Thank you,
Dmitri Pal

Sr. Engineering Manager IdM portfolio
Red Hat, Inc.</pre>
  </body>
</html>