Make or edit the file /etc/samba/smb.conf.master with the following similar values
[global]
unix charset = LOCALE
workgroup = YOUR-WORKGROUP-NAME
netbios name = YOUR-NETBIOS-NAME
interfaces = eth1, lo
bind interfaces only = Yes
passdb backend = ldapsam:ldap://your.server.name
enable privileges = Yes
username map = /etc/samba/smbusers
log level = 1
syslog = 0
log file = /var/log/samba/%m
max log size = 50
smb ports = 139
name resolve order = wins bcast hosts
time server = Yes
printcap name = CUPS
show add printer wizard = No
add user script = /opt/IDEALX/sbin/smbldap-useradd -m "%u"
delete user script = /opt/IDEALX/sbin/smbldap-userdel "%u"
add group script = /opt/IDEALX/sbin/smbldap-groupadd -p "%g"
delete group script = /opt/IDEALX/sbin/smbldap-groupdel "%g"
add user to group script = /opt/IDEALX/sbin/smbldap-groupmod -m "%u" "%g"
delete user from group script = /opt/IDEALX/sbin/smbldap-groupmod -x "%u" "%g"
set primary group script = /opt/IDEALX/sbin/smbldap-usermod -g "%g" "%u"
add machine script = /opt/IDEALX/sbin/smbldap-useradd -w "%u"
logon script = scripts\logon.bat
logon path = \\%L\profiles\%U
logon drive = X:
domain logons = Yes
preferred master = Yes
wins support = Yes
ldap suffix = dc=server,dc=name
ldap machine suffix = ou=People
ldap user suffix = ou=People
ldap group suffix = ou=Groups
ldap idmap suffix = ou=Idmap
ldap admin dn = cn=Manager,dc=server,dc=name
idmap backend = ldap:ldap://your.server.name
idmap uid = 10000-20000
idmap gid = 10000-20000
map acl inherit = Yes
printing = cups
printer admin = root # Add additional admin users here as needed
[apps]
comment = Application Files
path = /var/data/apps
admin users = bjordan
read only = No
[netlogon]
comment = Network Logon Service
path = /var/data/samba/netlogon
guest ok = Yes
locking = No
[profiles]
comment = Profile Share
path = /var/data/samba/profiles
read only = No
profile acls = Yes
[profdata]
comment = Profile Data Share
path = /var/data/samba/profdata
read only = No
profile acls = Yes
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
browseable = yes
guest ok = no
read only = yes
write list = root # Add additional admin users here as needed
[homes]
comment = Home Directories
valid users = %S
read only = No
browseable = No
[printers]
comment = SMB Print Spool
path = /var/spool/samba
guest ok = Yes
printable = Yes
browseable = No
Execute the folowing commands to test your conf file and make the real smb.conf
testparm -s /etc/samba/smb.conf.master > /etc/samba/smb.conf
Followed by
testparm
You just tested it one time by executing testparm again
Delete runtime files by executing:
rm /etc/samba/*tdb
rm /var/lib/samba/*tdb
rm /var/lib/samba/*dat
rm /var/log/samba/*
Samba-3 communicates with the LDAP server. The password that it uses to authenticate to the LDAP server must be stored in the secrets.tdb file. Execute the following to create the new secrets.tdb files and store the password for the LDAP Manager:
smbpasswd -w your-passwd
Then start samba:
service smb start
PDC Docs