[Samba] Migrate to LDAP

Luca Olivetti luca at wetron.es
Mon Mar 7 20:25:53 GMT 2005

Sascha Bieler wrote:
> Ok, that seems just to work if u have the given accounts on your linux box,
> otherwise I get this error message:
> build_sam_account: smbpasswd database is corrupt! username sascha with uid
> 501 is not in unix passwd database!
> If sascha is a linux user account pdbedit will import it in ldap... Maybe I
> missed a flag!?!

Take this with a grain of salt, since I'm still struggling with ldap:

1) copy the users you want to migrate in a file, say /root/people, and 
the corresponding shadow entries to, say, /root/shadow
2) add the content of /root/people at the end of /etc/passwd
3) use pdbedit -i to import smbpasswd
4) use the smbldap-migrate-passwd script this way:
   smbldap-migrate-passwd -d account -a -P /root/people -S /root/shadow
5) remove from /etc/passwd the entries you added in step 2
6) eventually migrate existing groups with smbldap-migrate-groups


More information about the samba mailing list