Skip to contentSkip to conversation

Krb5 Cifs Mount False IDs

DISCUSSION Felix 1 participant 1 message Nov 12

Subsystems (2)
lore
Share & tools
lore

Felix

author
#0 lore raw

Hello Folks,
I hope that I am somehow  correct to use this channel.

I try to use Autofs Maps with Wildcards to mount a network share as a home folder as soon as the user logs in. The maps are provided via AD.

SSSD is implemented to and works like a charm since I am able to authenticate the users. The Command klist shows a keytab.

If I do it via the mount command it works as expected. Since I am able to direct the mount process to the proper ccache file.

But If the cifs.upcall is triggerred it only "finds" the wrong ccache File.

In the Gnome Case its always _42

OS: Oracle 9.7
Cifs.upcall: 7.7
Here are some logs and the fsmap:

-fstype=smb3,sec=krb5,vers=3,noperm,rw,cruid=$UID,uid=$UID,user=& ://sharedhost/Profile$/&.v6

/etc/request-key.d/cifs.spnego.conf
create  cifs.spnego    * * /usr/sbin/cifs.upcall -d -E %k

Nov 12 10:50:38 CV-04-test kernel: CIFS: enabling forceuid mount option implicitly because uid= option is specified
Nov 12 10:50:38 CV-04-test kernel: CIFS: Attempting to mount //SharedHost/Profile$/johndoe.v6
Nov 12 10:50:38 CV-04-test cifs.upcall[4481]: key description: cifs.spnego;0;0;39010000;ver=0x2;host=SharedHost;ip4=192.168.50.25;sec=krb5;uid=0x2a;creduid=0x2a;user=johndoe;pid=0x117e;upcall_target=app
Nov 12 10:50:38 CV-04-test cifs.upcall[4482]: ver=2
Nov 12 10:50:38 CV-04-test cifs.upcall[4482]: host=SharedHost
Nov 12 10:50:38 CV-04-test cifs.upcall[4482]: ip=192.168.50.25
Nov 12 10:50:38 CV-04-test cifs.upcall[4482]: sec=1
Nov 12 10:50:38 CV-04-test cifs.upcall[4482]: uid=42
Nov 12 10:50:38 CV-04-test cifs.upcall[4482]: creduid=42
Nov 12 10:50:38 CV-04-test cifs.upcall[4482]: user=johndoe
Nov 12 10:50:38 CV-04-test cifs.upcall[4482]: pid=4478
Nov 12 10:50:38 CV-04-test cifs.upcall[4482]: upcall_target=app
Nov 12 10:50:38 CV-04-test cifs.upcall[4481]: upcall_target=app, switching namespaces to application thread
Nov 12 10:50:38 CV-04-test cifs.upcall[4481]: get_cachename_from_process_env: pid == 0
Nov 12 10:50:38 CV-04-test cifs.upcall[4481]: get_existing_cc: default ccache is FILE:/tmp/krb5cc_42
Nov 12 10:50:38 CV-04-test cifs.upcall[4481]: check_service_ticket_exists: unable to get client principal from cache: No credentials cache found (filename: /tmp/krb5cc_42)
Nov 12 10:50:38 CV-04-test cifs.upcall[4481]: get_tgt_time: unable to get principal
Nov 12 10:50:38 CV-04-test cifs.upcall[4481]: main: valid TGT is not present in credential cache
Nov 12 10:50:38 CV-04-test cifs.upcall[4481]: krb5_get_init_creds_keytab: -1765328174
Nov 12 10:50:38 CV-04-test cifs.upcall[4481]: handle_krb5_mech: getting service ticket for sharedhost
Nov 12 10:50:38 CV-04-test cifs.upcall[4481]: handle_krb5_mech: using GSS-API
Nov 12 10:50:38 CV-04-test cifs.upcall[4481]: GSS-API error init_sec_context: No credentials were supplied, or the credentials were unavailable or inaccessible
Nov 12 10:50:38 CV-04-test cifs.upcall[4481]: GSS-API error init_sec_context: No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_42)
Nov 12 10:50:38 CV-04-test cifs.upcall[4481]: handle_krb5_mech: failed to obtain service ticket via GSS (458752)
Nov 12 10:50:38 CV-04-test cifs.upcall[4481]: handle_krb5_mech: getting service ticket for sharedhost
Nov 12 10:50:38 CV-04-test cifs.upcall[4481]: handle_krb5_mech: using GSS-API
Nov 12 10:50:38 CV-04-test cifs.upcall[4481]: GSS-API error init_sec_context: No credentials were supplied, or the credentials were unavailable or inaccessible
Nov 12 10:50:38 CV-04-test cifs.upcall[4481]: GSS-API error init_sec_context: No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_42)
Nov 12 10:50:38 CV-04-test cifs.upcall[4481]: handle_krb5_mech: failed to obtain service ticket via GSS (458752)
Nov 12 10:50:38 CV-04-test cifs.upcall[4481]: Unable to obtain service ticket
Nov 12 10:50:38 CV-04-test cifs.upcall[4481]: Exit status 458752