<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Mar 9, 2015 at 2:45 PM, Alexander Bokovoy <span dir="ltr"><<a href="mailto:abokovoy@redhat.com" target="_blank">abokovoy@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, 09 Mar 2015, Ben Slusky wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Greetings FreeIPA users,<br>
<br>
I'm setting up FreeIPA service in our production environment to replace<br>
several different authentication methods for various systems. I'm trying to<br>
migrate the first wave of users now My plan was to copy their passwords<br>
from an old LDAP directory (one of the aforementioned several<br>
authentication methods) and then send them to the migration page to finish<br>
the job.<br>
</blockquote></span>
Even in migration mode, you can only set pre-hashed passwords when<br>
creating the records, not when modifying them.<span class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
bslusky@ipa1.aws:~$ head techteam-passwords.ldif<br>
dn: uid=user1001,cn=users,cn=<u></u>accounts,dc=smartling,dc=int<br>
changeType: modify<br>
replace: userPassword<br>
userPassword:: e1NTSE[...]<br>
-<br>
<br>
dn: uid=user1002,cn=users,cn=<u></u>accounts,dc=smartling,dc=int<br>
changeType: modify<br>
replace: userPassword<br>
userPassword:: e1NIQX[...]<br>
<br>
Unfortunately it isn't working:<br>
<br>
bslusky@ipa1.aws:~$ ldapmodify -x -D cn=directory\ manager -W -f<br>
techteam-passwords.ldif<br>
Enter LDAP Password:<br>
modifying entry "uid=user1001,cn=users,cn=<u></u>accounts,dc=smartling,dc=int"<br>
ldap_modify: Operations error (1)<br>
<br>
I found some possible causes of this error, and fixed them:<br>
<br>
bslusky@ipa1.aws:~$ ipa config-show |grep migration<br>
 Enable migration mode: TRUE<br>
<br>
bslusky@ipa1.aws:~$ ldapsearch -x -D cn=directory\ manager -W -b cn=config<br>
|grep allow-hashed<br>
Enter LDAP Password:<br>
nsslapd-allow-hashed-<u></u>passwords: on<br>
<br>
Still no soap. Any suggestions?<br>
</blockquote></span>
Works as designed. We only allow unhashed passwords in migration mode<br>
when entry is added, not modified.<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
/ Alexander Bokovoy<br></font></span></blockquote><div><br></div><div>Alexander: Thanks for clarifying that.<br><br></div><div>To anyone dealing with this or a similar problem who might find this in a web search:<br></div><div style="margin-left:40px"><span style="font-family:monospace,monospace">ipa user-add user0001 --first=User --last=0001 --setattr=userPassword='{SHA}...'</span><br></div><div>works like a charm (if migration mode is enabled).<br></div></div><br>-- <br><div class="gmail_signature"><div dir="ltr"><div></div><span><font color="#888888"><b style="color:rgb(153,153,153)">Ben Slusky<br></b><span><span style="color:rgb(153,153,153)">Smartling, Inc. Senior Operations Engine<font color="#888888">er</font></span><br></span></font></span><span><font color="#888888"><span><span><font color="#888888"><span><a href="mailto:bslusky@smartling.com" style="font-family:arial;font-size:small;color:rgb(17,65,112)" target="_blank"><font color="#35aad5">bslusky@smartling.com</font></a><span style="color:rgb(153,153,153);font-family:arial;font-size:small"></span></span></font></span> | <a href="http://www.smartling.com/" style="font-family:arial;font-size:small;color:rgb(17,65,112)" target="_blank"><font color="#35aad5">smartling.com</font></a><span style="color:rgb(153,153,153);font-family:arial;font-size:small"><a value="+18667076278"><br></a></span></span></font></span></div></div>
</div></div>