Samba configuration

Samba configuration


Prepare the system
If you want LDAP,
yum install openldap-clients perl-LDAP
Check LDAP's access,
ldapsearch -H ldap://LDAP_SERVER -x -b "dc=example,dc=com"


Configuration
Almost from scratch,
mv smb.conf smb.conf.dist
sed -e '/^#/d;/^[[:space:]]*$/d;/^;/d' smb.conf.dist > smb.conf
and adapt it to your needs,
[global]
workgroup = SAMBA2
security = user
load printers = no
username map = /etc/samba/smbusers
passdb backend = ldapsam:ldap://10.91.4.191
ldap suffix = dc=example,dc=com
#ldap machine suffix = ou=machines
#ldap user suffix = ou=users
#ldap group suffix = ou=groups
ldap admin dn = cn=admin,dc=example,dc=com
ldap delete dn = no
#domain logons = yes
#enable privileges = yes
#ldap passwd sync = yes
# domain logons = Yes
# domain master = Yes
[homes]
browseable = no
writable = yes

Check the configuration,
testparm

Configure the LDAP admin password,
smbpasswd -w examplepassword


ERROR: failed to setup guest info.
- Check secrets.tdb.
- Do,
net getlocalsid
net getlocalsid
pdbedit -L
pdbedit -Lv guest
- Check LDAP (ldapsearch uid=guest)


On the client
Check the service remotely,
smbclient -L SERVER_IP
[root or ldap admin password]

Configure some mountpoint,
//SERVER_IP/folder /destfolder smbfs rw,user,uid=500,gid=500,username=USERNAME,password=PASSWORD 0 0
Note. this works to mount share from Windows machines too.


Samba printing references
Printer driver download : www.mail-archive.com/samba@lists.samba.org/msg31626.html

Samba / LDAP references

Other troubleshooting references

No comments:

Post a Comment