Skip to main content
Topic: PGP-Smartcard with OpenRC (Read 4080 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

PGP-Smartcard with OpenRC

I couldn't find any  pcsclite-openrc package to enable the daemon.

In the Arch-Wiki this seems to be needed.

I'm unable to connect with my USB-PGP-Smartcard

Re: PGP-Smartcard with OpenRC

Reply #1
Try this and report back.
Code: [Select]
#!/usr/bin/openrc-run
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

name="PC/SC Daemon"

pidfile=/run/pcscd/pcscd.pid

command=/usr/bin/pcscd
command_args="${EXTRA_OPTS}"

start_stop_daemon_args="--user pcscd:pcscd"

depend() {
need localmount
after udev openct dbus
use logger
}

start_pre() {
checkpath -d -m 0755 -o pcscd:pcscd /run/pcscd
}

Re: PGP-Smartcard with OpenRC

Reply #2
Thank you for your response.

I don't know what to do?  ::)

This seems to be a shell-skript but where should I copy this?
/usr/bin/openrc-run is not in a readable format.


Re: PGP-Smartcard with OpenRC

Reply #4
I'll add pcsclite to our galaxy repo along with the openrc package.
Konimex adds the runit package when he has time.

Re: PGP-Smartcard with OpenRC

Reply #5

Didn't work. :(
Code: [Select]
$ sudo rc-service pcsclite start
 * Caching service dependencies ...                                                                              [ ok ]
 * checkpath: owner `pcscd:pcscd' not found
 * ERROR: pcsclite failed to start

Re: PGP-Smartcard with OpenRC

Reply #6
Didn't work. :(
Code: [Select]
$ sudo rc-service pcsclite start
 * Caching service dependencies ...                                                                              [ ok ]
 * checkpath: owner `pcscd:pcscd' not found
 * ERROR: pcsclite failed to start


Could you please comment out the start_pre() function and report back?

Code: [Select]
#start_pre() {
# checkpath -d -m 0755 -o pcscd:pcscd /run/pcscd
#}

Alternatively, could you try, either create a pcscd group and user, or set it to an existing user/group.

We'll improve the script, the package is in repos

Re: PGP-Smartcard with OpenRC

Reply #7
Could you please comment out the start_pre() function and report back?
Code: [Select]
 * Caching service dependencies ...                                                                                                [ ok ]
 * Starting PC/SC Daemon ...
 * start-stop-daemon: user `pcscd' not found
 * Failed to start PC/SC Daemon                                                                                                      [ !! ]
 * ERROR: pcsclite failed to start

Quote
Alternatively, could you try, either create a pcscd group and user, or set it to an existing user/group.
We'll improve the script, the package is in repos
In wich groups must be the user?

Re: PGP-Smartcard with OpenRC

Reply #8
If you're the only user in the machine, your user and primary group will be fine.

Re: PGP-Smartcard with OpenRC

Reply #9
If you're the only user in the machine, your user and primary group will be fine.
Fails also:
Code: [Select]
 * Caching service dependencies ...                                                                                          [ ok ]
 * /run/pcscd: correcting owner
 * Starting PC/SC Daemon ...
 * start-stop-daemon: user `pcscd' not found
 * Failed to start PC/SC Daemon                                                                                               [ !! ]
 * ERROR: pcsclite failed to start
seems that it is needed to install the user pcscd?

Re: PGP-Smartcard with OpenRC

Reply #10
Please the script you put manually and install pcsclite-openrc.

You find a config file in /etc/conf.d/pcscd in case the default user:group setting doesn't work.

 

Re: PGP-Smartcard with OpenRC

Reply #11
Please the script you put manually and install pcsclite-openrc.
You find a config file in /etc/conf.d/pcscd in case the default user:group setting doesn't work.
Unfortunately, I can not install this package because I have freed my system and Artixlinux merely serves as a base.
I must wait until parabola add the package.
I tried to install the package manually, but I get the error: Invalid or corrupted package (PGP signature) even though I imported the key when I polled.

Re: PGP-Smartcard with OpenRC

Reply #12
Unfortunately, I can not install this package because I have freed my system and Artixlinux merely serves as a base.
I must wait until parabola add the package.
I tried to install the package manually, but I get the error: Invalid or corrupted package (PGP signature) even though I imported the key when I polled.


so we are doing support for parabola here?
I mean seriously, we are really thin in manpower...

Re: PGP-Smartcard with OpenRC

Reply #13
Fails also:
Code: [Select]
 * Caching service dependencies ...                                                                                          [ ok ]
 * /run/pcscd: correcting owner
 * Starting PC/SC Daemon ...
 * start-stop-daemon: user `pcscd' not found
 * Failed to start PC/SC Daemon                                                                                               [ !! ]
 * ERROR: pcsclite failed to start
seems that it is needed to install the user pcscd?

Oh, come on, if you don't know about 'adduser' then why are you even running a rolling-release distro?

Re: PGP-Smartcard with OpenRC

Reply #14
so we are doing support for parabola here?
I mean seriously, we are really thin in manpower...
I'm really disappointed. :(
Where is the difference if I install Artixlinux and remove all non-free components manually, or this work takes over the parabola-script?
I had mistakenly assumed this forum would exist to help other people.
All the tips I have from this forum I could apply 1:1 on Parabola.

Oh, come on, if you don't know about 'adduser' then why are you even running a rolling-release distro?
Because I love the 'arch-way'.
There is no master yet fallen from the sky.
I know that I add the new group with:
Code: [Select]
# groupadd pcscd
and I know that a new user was created with:
Code: [Select]
# useradd pcscd
But I don't know which parameters are needed because this is no user to login.

Anyway,
with that
Code: [Select]
 * /run/pcscd: creating directory
 * /run/pcscd: correcting owner
 * Starting PC/SC Daemon ...                                                                                          [ ok ]
But my smartcard would not detected:
Code: [Select]
$ gpg2 --card-status
gpg: selecting openpgp failed: No suitable device found
gpg: OpenPGP Card does not exist: No suitable device found
With Arch+systemd and the same yubikey this worked.