Mount samba shares with kerberos+auto fs on Debian 8 Jessie
Install autofs and cifs
apt-get install autofs cifs-utils
Configure auto fs
nano /etc/auto.master
+dir:/etc/auto.master.d
/mnt/files /etc/auto.files --ghost,--timeout=30
+auto.master
nano /etc/auto.files
#samba shares
share1 -fstype=cifs,sec=krb5,uid=${UID},cruid=${UID} ://samba_server/share1
share2 -fstype=cifs,sec=krb5,uid=${UID},cruid=${UID} ://samba_server/share2
#homes
* -fstype=cifs,sec=krb5,uid=&,cruid=& ://samba_server/&
systemctl restart autofs
Test
Your kerberos ticket should be valid (check with “klist”, or else do “kinit loginname”). Browse to /mnt/files with the files explorer, you shoud see share1 and share2. Browse to /mnt/files/loginname, you shoud see your private samba folder.
Leave a comment