The goal is to change Samba and Unix-Passwords in an LDAP-Directory with the commands

A common LDAP Setup on Debian Sarge with Samba
Installation of smbk5pwd on Debian Sarge
1. Common Setup
2. Installation of smbk5pwd on debian sarge
  • /usr/bin/passwd
    root@thomas:~# passwd sebi
    New password: 
    Re-enter new password: 
    LDAP password information changed for sebi
    passwd: password updated successfully
    root@thomas:~# ldapsearch -W -x -D "cn=admin,dc=mydomain" -b "dc=mydomain" uid=sebi
    Enter LDAP Password: 
    
    dn: uid=sebi,ou=users,dc=mydomain
    objectClass: top
    objectClass: account
    objectClass: posixAccount
    objectClass: sambaSamAccount
    uid: sebi
    cn: sebi
    homeDirectory: /home/users/sebi
    uidNumber: 1000
    gidNumber: 100
    loginShell: /bin/bash
    description: Administrator
    sambaSID: S-1-5-21-2632658502-2305551154-663445729-3000
    sambaPrimaryGroupSID: S-1-5-21-2632658502-2305551154-663445729-1201
    displayName: sebi
    sambaPwdCanChange: 1117662148
    sambaPwdMustChange: 1119476548
    sambaPasswordHistory: 00000000000000000000000000000000000000000000000000000000
     00000000
    sambaAcctFlags: [U          ]
    userPassword:: e1NTSEF9VC9sQi9rUEIvUTkrOFQ3OGhENkJPby84TlpiZHg1ZUE=
    userPassword:: e1NIQX1DKzdIdGVvL0Q5dkpYUTNVZnp4YnduWGFpak09
    userPassword:: e1NNRDV9bWhJcWowMVhxQWF5aDJ1YlZjMEY3c3JLOEFVPQ==
    userPassword:: e01ENX1yTDBZMjB6QytGenQ3MlZQek1TazJBPT0=
    sambaPwdLastSet: 1117662323
    sambaLMPassword: 5bfafbebfb6a0942aad3b435b51404ee
    sambaNTPassword: ac8e657f83df82beea5d43bdaf7800cc
    
    As you can see, passwords a) get generated and b) changed.
    From: Erik Forsberg forsberg@XXXX
    To: reiffert@XXXX
    Subject: http://student.physik.uni-mainz.de/~reiffert/smbk5pwd.html
    
    Hi!
    
    Found http://student.physik.uni-mainz.de/~reiffert/smbk5pwd.html, and
    it was exactly what I was looking for. Thanks!
    
    Btw, may I suggest changing the instruction about satisfying the
    build-dependencies. Instead of adding the packages manually, you can
    use 'apt-get build-dep slapd' to automatically fetch all required
    packages.