Hi all,

I've inherited a system which is using samba and ldap to authenticate users (both on the local machine, and Windows machines on the LAN)

Any advice on the best way to add users? The best I could think of was do get an existing user's ldap entry (with ldapsearch), modify it (ie change the username, uid etc) by hand, then insert it with ldapmodify.

Trouble is, there are various fields that I don't know how to create manually, eg:
sambaSID: S-1-5-21-3472792842-2593668919-3072929089-3078
sambaPrimaryGroupSID: S-1-5-21-3472792842-2593668919-3072929089-513
sambaPasswordHistory: A94CEEB6BA9DDEEF2FE5DED05CF197002C856BDE83B30CB9D9BF7A25
Someone recommended mkntpwd. Would I just paste the output of that into the sambaPasswordHistory field? Is there a cleaner solution for generating this sort of thing?