# Desktop/sudo on Ubuntu 24.04

**URL:** https://support.nitrokey.com/t/desktop-sudo-on-ubuntu-24-04/6938
**Category:** Nitrokeys
**Created:** [April 4, 2025, 9:31am UTC](https://support.nitrokey.com/t/desktop-sudo-on-ubuntu-24-04/6938 "2025-04-04T09:31:29Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![panspectron](https://support.nitrokey.com/letter_avatar_proxy/v4/letter/p/8baadc/32.png) [@panspectron](https://support.nitrokey.com/u/panspectron)
#### Post date: [April 4, 2025, 9:31am UTC](https://support.nitrokey.com/t/desktop-sudo-on-ubuntu-24-04/6938/1 "2025-04-04T09:31:29Z")

</div>

Hi all

I really don’t get this to work.  
I want to use my Mini-NK3 to login (console and lightdm) and for sudo.

I included “auth sufficient pam\_u2f.so authfile=/etc/Nitrokey/u2f\_keys cue [cue\_prompt=Please touch the device.] prompt nouserok userpresence=1” to /etc/pam.d/common-auth

(following [Desktop Login And Linux User Authentication - Nitrokey Documentation](https://docs.nitrokey.com/nitrokeys/features/u2f/desktop-login))

But I never geht ask for touching the NC nor can I gain access (Password still works).  
I cannot see any errors in the logfile, actualy there is no logentry saying that u2f.so actually did something.

“nitropy nk3 test” seems to work.  
"Firmware version: v1.8.1  
Init status: ok  
Free blocks (int): 219  
Free blocks (ext): 459  
Variant: NRF52  
"  
nitroapp2 works  
keepassxc works (with touch)

If I misconfigure /etc/pam.d/common-auth on purppose I get erros.  
So the line there is read/used, but to no effect…

The docu says the the Requirements are “\* Ubuntu 20.04 with Gnome Display Manager.”  
Maybe NK3 don’t work with Ubuntu 24.xx?

Any hint would be very much appreciated

---

<div class="post-metadata">

### Author: ![nk\_hsm](https://support.nitrokey.com/letter_avatar_proxy/v4/letter/n/ed8c4c/32.png) [@nk\_hsm](https://support.nitrokey.com/u/nk_hsm)
#### Post date: [April 4, 2025, 12:31pm UTC](https://support.nitrokey.com/t/desktop-sudo-on-ubuntu-24-04/6938/2 "2025-04-04T12:31:03Z")

</div>

Seems related/the same as [Nitrokey HSM 2 no longer detected - #3 by daubsi](https://support.nitrokey.com/t/nitrokey-hsm-2-no-longer-detected/6933/3)?

---

<div class="post-metadata">

### Author: ![panspectron](https://support.nitrokey.com/letter_avatar_proxy/v4/letter/p/8baadc/32.png) [@panspectron](https://support.nitrokey.com/u/panspectron)
#### Post date: [April 6, 2025, 5:09pm UTC](https://support.nitrokey.com/t/desktop-sudo-on-ubuntu-24-04/6938/4 "2025-04-06T17:09:21Z")

</div>

Thanks for the reply.  
It was my mistake. I did some changes to other pam-files apart from common-auth and forgot about it… sorry for the trouble. So I can confirm it works for ubuntu 24.xx fine.  
I still have to figure out, if it is possible to include several “keys” in /etc/Nitrokey/u2f\_keys…  
It seems only one key works, which is unfortunate… but not a show stopper.

---

<div class="post-metadata">

### Author: ![ion](https://support.nitrokey.com/letter_avatar_proxy/v4/letter/i/f1d935/32.png) [@ion](https://support.nitrokey.com/u/ion)
#### Post date: [April 6, 2025, 7:53pm UTC](https://support.nitrokey.com/t/desktop-sudo-on-ubuntu-24-04/6938/5 "2025-04-06T19:53:34Z")

</div>

If you strictly followed the doc guide, it has an error regarding multiple keys. The command `$ pamu2fcfg > ~/.config/Nitrokey/u2f_keys` does not “…append its output the `u2f_keys`” as written.  
To add a second key, use `$ pamu2fcfg >> ~/.config/Nitrokey/u2f_keys` and make sure not to add line breaks manually (it will lead to only the first key being recognised).

---

<div class="post-metadata">

### Author: ![panspectron](https://support.nitrokey.com/letter_avatar_proxy/v4/letter/p/8baadc/32.png) [@panspectron](https://support.nitrokey.com/u/panspectron)
#### Post date: [April 7, 2025, 5:42pm UTC](https://support.nitrokey.com/t/desktop-sudo-on-ubuntu-24-04/6938/6 "2025-04-07T17:42:08Z")

</div>

Ah, of course I put in line breaks, that looks nicer! 😉
