linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kim Henriksen <kh@ipimp.at>
To: linux-cifs@vger.kernel.org
Subject: Problem storing credentials with pam_cifscreds on desktop systems
Date: Sun, 20 Jun 2021 16:06:37 +0200	[thread overview]
Message-ID: <CAC3UJ6mbUA1Q2wDKgjoXuyp3GuCHWMv7vfhypX9az5KtX-_z+w@mail.gmail.com> (raw)

I wish to store CIFS credentials during login on a desktop, but I've
hit a brick wall, and my google foo has failed me.

When I login via the desktop environment no CIFS credentials are
available, but it works fine using SSH.

I have tried with Ubuntu 20.04 and Fedora 34, but same result.

This is how my Fedora installation is configured:

pam_cifscreds.x86_64      6.11-3.fc34

I have added these lines to: /etc/pam.d/{gdm-password,login,sshd}

auth          optional      pam_cifscreds.so debug
session     optional      pam_keyinit.so force revoke
session     optional      pam_cifscreds.so host=<myserver> debug

From the journal log when logging in can see the credentials gets stored:

gdm-password][3362]: pam_cifscreds(gdm-password:session): credential
key for \\<myserver>\<myuser> added
sshd[2835]: pam_cifscreds(sshd:session): credential key for
\\<myserver>\<myuser added

But I can't see the CIFS credentials in my desktop session:

$ keyctl show
Session Keyring
 882498672 --alswrv   1000  1000  keyring: _ses
1026128626 --alswrv   1000 65534   \_ keyring: _uid.1000

But when I login using SSH they are there:

$ keyctl show
Session Keyring
 145928652 --alswrv   1000  1000  keyring: _ses
1026128626 --alswrv   1000 65534   \_ keyring: _uid.1000
 802829928 ----sw-v      0     0   \_ logon: cifs:a:<myserver>

I'm not totally sure, but I think the problem in general is related to
this: https://github.com/systemd/systemd/issues/1299

-- 
Mvh.
Kim Henriksen

                 reply	other threads:[~2021-06-20 14:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAC3UJ6mbUA1Q2wDKgjoXuyp3GuCHWMv7vfhypX9az5KtX-_z+w@mail.gmail.com \
    --to=kh@ipimp.at \
    --cc=linux-cifs@vger.kernel.org \
    --subject='Re: Problem storing credentials with pam_cifscreds on desktop systems' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).