Yubico / yubikey-personalization-gui

YubiKey Personalization GUI
https://developers.yubico.com/yubikey-personalization-gui
BSD 2-Clause "Simplified" License
198 stars 38 forks source link

Launch with gksu or gksudo on Debian / Ubuntu #10

Closed chmac closed 11 years ago

chmac commented 11 years ago

Not sure about other distros, but on Ubuntu the tool only works if run as root. The .desktop file could be updated to exec gksu yubikey-personalization-gui or gksudo yubikey-personalization-gui which would run it as root by default. Might save new users from confusion.

That or report a permissions error as the command line util does, currently on Ubuntu 12.04 the app launches fine but says only "No YubiKey inserted".

dainnilsson commented 11 years ago

Better than running as root may be to set up the permissions for the user to access the YubiKey, which can be done using the included (in yubikey-personalization) udev rules. I thought we had better documentation describing the process for doing so, but I can't seem to find it now, so that should be improved both for the command line tool as well as the gui.

chmac commented 11 years ago

If the .deb set up the udev rules, that would be nice. Not sure how that would work practically though. One would presumably have to make a decision as to which users are allowed. Maybe based on a new "yubikey" group? Seems like a lot of complication versus requiring root permissions. I can see the merits of both options though.

dainnilsson commented 11 years ago

I agree. I've added a note to the yubikey-personalization Read Me about running either as root or setting the udev permissions.

At least having a clearer error message from the tool would be a nice improvement.

klali commented 11 years ago

The yubikey-personalization package includes an udev file for setting the permissions. It might be an idea to move that to the library package instead..

klali commented 11 years ago

This (should/will) be solved by moving the udev rules for yubikeys from yubikey-personalization to libykpers.

chmac commented 11 years ago

Alas, this update gave me the following error on apt-get upgrade:

E: /var/cache/apt/archives/libykpers-1-1_1.11.3-1~ppa2~precise1_amd64.deb: trying to overwrite '/lib/udev/rules.d/70-yubikey.rules', which is also in package yubikey-personalization 1.11.3-1~ppa1~precise1

Then apt was a little broken, for example:

$ sudo apt-get autoremove Reading package lists... Done Building dependency tree
Reading state information... Done You might want to run ‘apt-get -f install’ to correct these. The following packages have unmet dependencies. yubikey-personalization : Depends: libykpers-1-1 (>= 1.11.3-1~ppa2~precise1) but 1.11.3-1~ppa1~precise1 is installed E: Unmet dependencies. Try using -f.

In the end sudo apt-get remove yubikey-personalization and sudo apt-get install yubikey-personalization resolved the issues.

klali commented 11 years ago

Yes, I messed up the moving files stuff.. the new version of the library should replace the old version of yubikey-personalization. I uploaded a new version to the ppa now that should be better..