Hi<br><br>Although I think the best solution for this is that Samba only update the Unix password, and the server generates dinamically the sambaLM and sambaNT passwords using a plugin (perhaps, in the future, we will contribute with this plugins, but not right now), I have solved the problem described in my first message in this way, in the samba configuration:<br>

<br>  * ldap passwd sync = No<br>  * unix password sync = Yes<br>  * passwd program = /usr/bin/perl -w /opt/ldap/smbldap-tools/bin/smbldap-passwd -u %u<br>  * passwd chat = &quot;Changing UNIX password for*\nNew password*&quot; %n\n &quot;*Retype new password*&quot; %n\n &quot;*Password changed*&quot;<br>

<br>So when a user tries to modify his password, then Samba tries to call the &quot;passwd program&quot;, and only if the command returns succesfully (the &quot;passwd chat&quot; is ok), then it tries to update samba passwords, so the LDAP password policies are checked when calling the smbldap-passwd script, because it will fail if the password is not strong enough and the server rejects it.<br>

<br>I had to modify the script smbldap-passwd, because when the password is changed succesfully, it did&#39;nt print anything, and &quot;passwd chat&quot; needs some string to check that the change has been succesfully (i had added &quot;password changed&quot; in the script after the ldap operation when it is succesfull).<br>

<br>Hope this can help somebody.<br><br>Regards.<br><br><br><div class="gmail_quote">El 21 de junio de 2010 15:46, Miguel Medalha <span dir="ltr">&lt;<a href="mailto:miguelmedalha@sapo.pt">miguelmedalha@sapo.pt</a>&gt;</span> escribió:<br>

<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im"><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Emmm, well, this makes samba update userPassword when changing the password from Windows. But if i change the password from Linux, samba passwords are not updated, because linux machines are autheticating directly with LDAP, not with Samba (just userPassword).<br>


</blockquote>
<br></div>
In that case, the LDAP server must be capable of updating the Samba passwords when the LDAP password is changed, which takes us back to your original question.<br>
<br>
Anyway, the smb.conf parameter to use for that would be:<br>
<br>
&quot;ldap passwd sync = Only&quot;<br>
<br>
(Only = Only update the LDAP password and let the LDAP server do the rest.)<br>
<br>
<br>
If the 389 server doesn&#39;t do the required operation, I suppose that by using the regular LDAP tools (ldapmodify, ldappasswd, etc.) combined with a shell script it will be easy to modify all passwords with a single command.<br>


<br>
</blockquote></div><br>