Mar 5

I have an openfiler based NAS running as my main file server and an ubuntu VM running rsync that backs that server up. I wanted to be able to browse my backups via samba, and for giggles, authenticate that samba server against the openfiler LDAP that is already configured. This turned out to be really easy.   First install samba.

sudo apt-get install samba

In the new /etc/samba/smb.conf, you need to replace the passdb backend statement with

passdb backend ldapsam:ldap://$DNS_NAME_OF_OPENFILE

and add the following lines

ldap ssl = no
ldap admin dn = cn=Manager,dc=$YOURDOMAIN,dc=com
ldap suffix = dc=$YOURDOMAIN,dc=com
ldap user suffix = ou=People
ldap group suffix = ou=Group

Be sure to replace $YOURDOMAIN with the domain you configured when you first setup LDAP in openfiler.
The last step is to store LDAP auth credentials in the secrets.tdb file so samba can query your LDAP. you do that by running

smbpasswd -w $OPENFILER_LDAP_PASSWORD

and replace $OPENFILER_LDAP_PASSWORD with the LDAP password you configured when you created the openfiler LDAP. restart samba with

service smbd restart

And you should now be authenticating to you openfiler LDAP!

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.