[Samba] Samba, Kerberos, Autofs: Shares get disconnected

Christian Naumer christian.naumer at greyfish.net
Tue Feb 6 14:53:46 UTC 2024


Hi.

Am 06.02.24 um 13:27 schrieb Pluess, Tobias via samba:
> Hi,
> I am still trying to figure out the best settings for Samba and Kerberos
> with autofs.
> My setup so far works good, users can log in on their computers using AD
> credentials, and they can access network shares with AD credentials as
> well. This works perfect.
> Also I notice that some Kerberos ticket is created upon user login, which
> allows the users to access a Samba share without entering the password,
> which is very convenient.
> For this to work, I had to create the SPNs in AD. However, that worked. So
> currently, it works all quite convenient.
> Further, I have configured autofs to automatically mount for each user the
> network shares they need.
> For this, I used the "multiuser" and "sec=krb5" options. This also works as
> I expected. However, I notice the following problem.

This works for me.

I have this in "/etc/auto.cifs"

Share -fstype=cifs,multiuser,cruid=${UID},sec=krb5 ://server/Share


and this in "/etc/auto.master"

/cifs /etc/auto.cifs --timeout=300 --ghost


This ways if the share is not used it is unmounted and mounted again 
when the folder is opened.

But my Kerberos ticket is renewed automatically.

By the was which SPNs did you create? I did not have to do this.


Regards

Christian







More information about the samba mailing list