From: Fredrik Salomonsson <plattfot@posteo.net>
To: help-guix <help-guix@gnu.org>
Subject: Question about PAM service
Date: Fri, 02 Aug 2024 20:31:01 +0000 [thread overview]
Message-ID: <87zfpu3bwa.fsf@posteo.net> (raw)
Hello Guix,
I recently changed my setup at home for work. Now I have a laptop to do
my work on and my desktop (that's running Guix) for my personal notes
etc. I still jump between the two through out the day. It is a bit
annoying to have to type in my password every time I switch to my
desktop to unlock swaylock.
I got an u2f compatible USB key which got me thinking. I might be able
to set it up that swaylock requires either password or the u2f key.
That way I don't need to type in my password to unlock my desktop all
the time. Although it is a bit unclear if swaylock can handle this or
not.
However it does not look supertrivial to modify a PAM service. So
before I venture down this path I figured it might be good to ask the
community to see if someone has done something similar?
From what I have gathered so far I need to disable the PAM services for
`screen-locker-service`. Something like this:
```
(service screen-locker-service-type
(screen-locker-configuration
(name "swaylock")
(program (file-append swaylock "/bin/swaylock"))
(using-pam? #f)
(using-setuid? #f)))
```
Then define my own for swaylock using `unix-pam-service`. But grab the
result from that and modify the `auth` section to add the pam-u2f module
and also change the password from `required` to `sufficient`. Does that
sound right? Or is there a better way of going about this?
Thanks
--
s/Fred[re]+i[ck]+/Fredrik/g
next reply other threads:[~2024-08-02 20:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-02 20:31 Fredrik Salomonsson [this message]
2024-08-05 19:26 ` Question about PAM service Felix Lechner via
2024-08-07 23:26 ` Fredrik Salomonsson
2024-09-03 5:11 ` Fredrik Salomonsson
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zfpu3bwa.fsf@posteo.net \
--to=plattfot@posteo.net \
--cc=help-guix@gnu.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).