I've setup a Samba AD on Debian Stretch. Another stretch client node is able to authenticate using AD credentials.
The domain user has limited rights on the client node, meaning he can't mount anything on the client.
On client, I have tested two things:
Mounting using password:
# mount -t cifs \\\\fileserver.my.org\\share /mnt -o user=domainUser1
I'm then asked domain password for
domainUser1
. Afterwards, the share is mounted byroot
.Mounting using Kerberos ticket:
# kinit domainUser1
# mount -t cifs \\\\fileserver.my.org\\share /mnt -o sec=krb5
This way I can mount the share if my current session has kerberos ticket (verified by
klist
).
Everything works find for manual mounting. The problem starts once I try to use AutoFS to mount share.
/etc/auto.master
reads:
+dir:/etc/auto.master.d
+auto.master
/cifs /etc/auto.cifs
And /etc/auto.cifs
reads:
Share -fstype=cifs,multiuser,cruid=${UID},sec=krb5 ://fileserver.my.org/share
From what I learnt about AutoFS in the last hour, this should work. But for some reason, /cifs/
folder is always empty. I tried both /var/log/messages
and /var/log/syslog
, but nothing noteworthy found in logs.
ls -l /cifs/Share
? Autofs only mounts on demand./cifs
will remain empty until something tries to access/cifs/Share
, which in turn will trigger mounting the share. If you want to see which shares are available before accessing them, you may need a script similar toauto.net
(typically a script included in theautofs
package). This could - for example - list all shares on a host by dynamically generating the list map by polling the server. – sborsky Mar 4 '19 at 19:36