Samba auth to LDAP


Copyright 2002, 2003 Andy Barclay
OpenContent License (OPL)

Download and install latest version of samba from samba.org
At this point, that version is 2.2.8a

Pre-requisites:
openldap-devel

Extract it and build it

make distclean
./configure --with-ldapsam
make
sudo make install

Used the smb.conf from majestix. Changed the netbios name and
the server named to SPACE
mkdir /var/log/samba

copy in a startup script and link it into the correct directories

copy the samba.schema file to majestix:/etc/openldap/schema
modify the slapd.conf file to include this file

restart slapd

NOTE: NOTE: NOTE: if you run the courier mail system, this must
also be restarted.

Edit /etc/samba/smb.conf and added the following:
----
netbios name = SPACE
ldap admin dn = "cn=manager,dc=collation,dc=net"
ldap server = ldap.eng.collation.net
ldap ssl = off
ldap port = 389
ldap suffix = "ou=people,dc=collation,dc=net"
----

compile and cp examples/LDAP/smbldap-tools/mkntpwd/mkntpwd executable to /usr/local/samba/bin

NOTE: After starting the daemon, you must run:
# smbpasswd -w ldap_password

Now, take all the user's in ldap and make them sambaAccount objectclass too.
-----
dn: cn=Andy Barclay,ou=People,dc=collation,dc=net
objectClass: posixAccount
objectClass: shadowAccount
objectClass: inetOrgPerson
objectClass: sambaAccount
cn: Andy Barclay
uid: andybar
uidNumber: 1012
homeDirectory: /home/andybar
loginShell: /bin/ksh
gecos: Andy Barclay
shadowLastChange: 11022
shadowFlag: 0
sn: Barclay
telephoneNumber: 650 475 6789
homePostalAddress: 567 Corsina Court, Almont, Ca, 96789
homePhone: 925 660 5555
preferredLanguage: English
mobile: 925 567 5456
mail: andy@buggs.unixpeople.net
mail: andybar@testing.com
gidNumber: 500
rid: 3024
userPassword:: e0NSWVBU2TEzUUtvUyJoL3dxtVU=
lmPassword: 70A24006F30A2927fAD3B435B51404EE
ntPassword:: RTJVQBA3RDNdNDY5QzBtN0IxQjc5NDVDNkE5MEVBRDgg
primaryGroupID: 2001
acctFlags: [UX         ]
pwdLastSet: 0
-----