Fedict / eid-mw

eID Middleware (main repository)
GNU Lesser General Public License v3.0
202 stars 78 forks source link

Lack of pcscd check on Linux #174

Closed Utopiah closed 2 years ago

Utopiah commented 2 years ago

Hi, just installed the eid-mw on Ubuntu 22.04. Everything worked nicely, no error, unfortunately also no card reader found despite it confirming visually, via hardware LED is was plugged in and reading the ID card. lsusb did show the card reader to be detected.

I tried on another desktop, an older Ubuntu 21.04 and it worked. I upgraded it to 22.04 and it also worked. I was consequently confident the hardware was fine.

I tried again on Ubuntu 22.04 but this time running pcsc_scan which warned me, with a rather obscure error message, that pcspd was not running. I started it with sudo service pcscd start then everything, eid-viewer and Firefox testing with the CSAM website, worked. I then enabled service at boot with sudo systemctl enable pcscd.

I hope others in similar situations would find this useful. That being said I believe checking for pcscp running and if not providing a warning would help.

yoe commented 2 years ago

So, first of all, there actually is a FAQ entry about this (although it mentions openSUSE, not Ubuntu):

https://eid.belgium.be/en/faq/opensuse-my-card-reader-not-found-what-should-i-do#7625

That being said, pcscd actually uses systemd socket activation, which should cause pcscd to be started automatically when the first client tries to connect to the socket. If that doesn't work, I would recommend that you file a bug with Ubuntu, because that means there is a problem with your configuration that is outside of the responsibility of the eID software.

Utopiah commented 2 years ago

Thanks, then I suggested updating the FAQ because indeed one could skip the answer if it's distribution specific.

I'll file a bug report for Ubuntu because that's a 1-day fresh install with nothing exotic so if the expected behavior is to work without user intervention, that wasn't the case for me but it did work in releases prior to 22.04.

metsma commented 2 years ago

This is known issue https://bugs.launchpad.net/ubuntu/+source/pcsc-lite/+bug/1971984

samvde commented 2 years ago

Perhaps we could just check whether the pcscd systemd socket is enabled and active and activate it if it isn't. I know Manjaro comes with pcscd.socket disabled per default as well:

$ systemctl status pcscd.socket ○ pcscd.socket - PC/SC Smart Card Daemon Activation Socket Loaded: loaded (/usr/lib/systemd/system/pcscd.socket; disabled; vendor preset: disabled) Active: inactive (dead) Triggers: ● pcscd.service Listen: /run/pcscd/pcscd.comm (Stream)

yoe commented 2 years ago

@samvde but we don't support Manjaro ;-)

That said, I just updated about-eid-mw to at least show something about socket activation (translation updates are necessary, so release will need to wait for that). That should help somewhat with this issue.

Modifying system-wide configuration can cause more problems than we fix, though. I would rather not do that if we can avoid it.

samvde commented 2 years ago

Thanks @yoe :-)