Leap 16.0, KDE, Fingerprint Reader or PW ... or both?

I installed and activated the fingerprint reader on my newer XPS Dell laptop. It works, but somehow not the way I imagined. Not sure where to tweak what …

I imagined it’s “either fingerprint OR passwort” logic. So if I don’t use fingerprint, then I can use the PW. That’s currently not what the system does: I guess, it’s adding a layer to the PW request. So, I need to the PW and in addition to that I need to do the fingerprint (with log in for example). I’m using currently a SDDM theme. I assume that I could use a empty PW, but that is not the way I would like to use it. I’m just to tired to enter my PW all the time …
Any suggestions?

Maybe this wll help: https://en.opensuse.org/SDB:Using_fingerprint_authentication

Thanks knurpht. Yes, I saw that documentation and it works this way (hit enter and use fingerprint).

But it’s not what I wanted: For example … allow my family to access my computer even if I (my finger) is not available (PW needed) and lazy entry for myself (fingerprint).

I’ve read through the wiki documentation (although I don’t use it), and it looks like it’s designed to be configured on a per-user basis. Wouldn’t that mean each family member would have their own account to log in with?

Apologies if I’ve misunderstood something.

That is of course why one runs a multi-user (and multi-session) operating system. That is pure logic, with or without a fingerprint reader.

Well yes. My question is aimed at clarifying if the OP has set up the requisite accounts (or had expected them to be able to login to the same “shared” account for some reason). :wink:

Indeed, my intention was to have one “shared” account.

But, yeah, I could do it this way (accounts for the other family members).
Although then I need to make all my folder/files available for them as they should have access to most of them …

Thanks for clarifying. This leads to a different topic than the one you started, but in this case I would recommend setting up a common shared directory for this purpose.

Start by setting up a supplementary common group for this. For exmaple
sudo groupadd shared

Now add the users who require shared file access
sudo usermod -aG shared username
Repeat for each user including yourself. (Don’t forget to log out and back in for your own primary account so that it takes effect.)

Create a shared directory eg /srv/shared

sudo mkdir /srv/shared
sudo chown root:shared /srv/shared
sudo chmod 2770 /srv/shared

The setgid bit (2 in 2770 ) ensures that files and subdirectories created within the directory inherit the shared group ownership. Also, set default ACLs to help ensure group members have the necessary access to newly created files and directories

sudo setfacl -m g:shared:rwx /srv/shared
sudo setfacl -d -m g:shared:rwx /srv/shared

You can verify the permissions with getfacl /srv/shared

Once that’s done, you can move the files you want to share into /srv/shared via Dolphin for example.

Thanks very much. That’s for sure a doable solution … although not the one I was looking for (as I have a lot of folders/files to share if needed).

(Just wondering: I think my “OR-option” works with Mac and Windows, right?)

With the SDDM/PAM implementation, I think authentication is sequential by design. PAM processes the modules in order, so it must receive a result from the pam_unix.so module before passing control to pam_fprintd.so.

So if we examine /etc/pam.d/sddm (as per the wiki page)…

auth [success=1 new_authtok_reqd=1 default=ignore] pam_unix.so try_first_pass likeauth nullok
auth sufficient pam_fprintd.so
  1. Password authentication attempted first, and a successful password authentication skips the fingerprint module.

  2. If password authentication fails, PAM proceeds to fingerprint authentication.

  3. Successful fingerprint authentication is sufficient to authenticate.

I don’t have a fingerprint reader to test with, but perhaps you could try using

auth sufficient pam_fprintd.so
auth required pam_unix.so try_first_pass

This will process the fingerprint module first. A successful fingerprint is sufficient, otherwise PAM proceeds to password authentication. However, PAM processes modules sequentially, the password user must wait for fingerprint authentication to fail or time out first.

You could reduce the timeout from 30 seconds to 10 seconds with

auth sufficient pam_fprintd.so max-tries=1 timeout=10
auth required pam_unix.so try_first_pass

Reference:
https://wiki.archlinux.org/title/Fprint

Uhh, happy to try it out.
Just to make sure, I’ll need to replace those two lines in both files (kde/sddm in /etc/pam.d/), right?

One more thing. I read the archlinux documentation (thanks!); I cannot find those mentioned files:
/etc/pam.d/system-local-login and
/etc/pam.d/kde-fingerprint

I do see a file in /usr/lib/pam.d/kde-fingerprint but no …/system-local-login

that’s because I run openSuse, I guess, right?
And should I wait for Leap 16.1. Any chance this version would have a good solution?

Yes, if you want password-OR-fingerprint authentication to work both at the SDDM login screen and when unlocking the KDE screen locker, you’ll need to configure both PAM services (sddm and kde ).

The Arch Linux paths are distribution-specific. On openSUSE, vendor-supplied PAM files are under /usr/lib/pam.d , which is why you find kde-fingerprint there. The absence of system-local-login is normal.

I’d suggest making a backup of the existing PAM files before changing anything. Also, don’t edit the vendor files under /usr/lib/pam.d directly; use local overrides under /etc/pam.d .

As for Leap 16.1, I wouldn’t wait for it specifically for this. I haven’t seen anything to suggest it will introduce a different solution for fingerprint authentication.

Thanks for your feedback deano_ferrari.

So, I tested your input with the kde file → no success. Still PW AND fingerprint required when I log off/on.
On the sddm file: Is it right that I have the first 4 lines starting with “auth”? Meaning your 2 lines and the actual
auth requisite pam_nologin.so and
auth substack common-auth

Your existing SDDM PAM configuration already calls common-auth, which in turn handles password authentication. So you don’t need to add a separate pam_unix.so line.

For the proposed fingerprint-first experiment, the relevant change is to insert the fingerprint module between pam_nologin.so and common-auth.

On Leap 16, create a local override at /etc/pam.d/sddm, using /usr/lib/pam.d/sddm as the starting point. The authentication section should look like this:

#%PAM-1.0
auth     requisite      pam_nologin.so
auth     sufficient     pam_fprintd.so max-tries=1 timeout=10
auth     substack       common-auth

Leave the remaining account, password and session sections exactly as they are in the original file.

This should allow a successful fingerprint to authenticate directly. If fingerprint authentication fails or times out, PAM should proceed to common-auth for password authentication.

Don’t edit /usr/lib/pam.d/sddm directly, as that is the vendor-supplied file. Keep a backup of the original configuration and make sure you have another way to access the system if authentication fails.

Hmm, okay, you make we worry about losing access to my system, therefore I copied the 3 lines only into a kde file. Reboot etc … It’s still not working; same result: Enter PW and fingerprint needed.

I did not tried the sddm file (turn on/off) yet.
Time to give up?

As a learning thing:
I wonder why all those changes in the new generated files (sddm and kde) are done within /etc/pam.d/…? Those files are existing under /usr/lib/pam.d/
What’s the logic here?

The file locations explained:

  • /usr/lib/pam.d/ holds the vendor defaults shipped by packages.
  • /etc/pam.d/ holds your local overrides.

Linux-PAM looks in /etc/pam.d/ first. If a file with that name exists there, it is used instead of the vendor file, not merged with it. If there’s no file in /etc, PAM falls back to /usr/lib/pam.d/. This keeps package updates from overwriting your changes, and it leaves the system working if you delete your override.

If your new /etc/pam.d/kde contains only 3 lines, it replaces the whole vendor kde file, so the other lines (account, session, etc.) are gone. Better to copy the full vendor file and then edit it (as I mentioned before)…
sudo cp /usr/lib/pam.d/kde /etc/pam.d/kde

Also, for the SDDM login screen the relevant file is /etc/pam.d/sddm (or the vendor one). Plasma’s lock screen also has a separate fingerprint stack, kde-fingerprint, so check which service you’re actually testing.

Thanks for the explanation! Got it.
I did all the copy/past files again and still no success. I cannot use the fingerprint reader instead of the PW (beside the other logic [enter & fingerprint afterwards] we discussed before).
It’s kind of a additional layer now. PW and fingerprint needed in order to log in …