aluzzardi / pam_usb

Hardware authentication for Linux using ordinary USB Flash Drives.
GNU General Public License v2.0
151 stars 82 forks source link

pamusb-check fails (Permission Denied) #14

Open bkanuka opened 11 years ago

bkanuka commented 11 years ago

I am on Ubuntu 12.10 and I believe I have everything configured properly, because this works:

bennett@bennett-laptop ~> su bennett
* pam_usb v0.5.0
* Authentication request for user "bennett" (su)
* Device "keychain" is connected (good).
* Performing one time pad verification...
* Access granted.

However, pamusb-fails:

bennett@bennett-laptop ~> pamusb-check --debug bennett
* Authentication request for user "bennett" (pamusb-check)
[src/local.c:037] Checking whether the caller is local or not...
[src/local.c:046] Authentication request from tty pts/0
[src/local.c:065] Caller is local (good)
[src/device.c:057] Connecting to HAL...
[src/device.c:034] Searching for "keychain" in the hardware database...
* Device "keychain" is connected (good).
* Performing one time pad verification...
[src/volume.c:102] Searching for volume with uuid 0342d264-25ca-47f7-b39b-3f86f1ba521c
[src/volume.c:130] Found volume 0342d264-25ca-47f7-b39b-3f86f1ba521c
[src/volume.c:087] Device /org/freedesktop/UDisks/devices/sdb1 is mounted on /media/bennett/PAM
[src/volume.c:134] Volume is already mounted.
[src/pad.c:060] Cannot open device file: Permission denied
* Pad checking failed !
* Access denied.

What specifically am I being denied access to? (Note: this does work with sudo pamusb-check --debug bennett )

porelli commented 11 years ago

The problem is related to permissions of files located inside .pamusb on the root of your usb token, use chgrp to change group to your main group and chmod to grant rwx to your group.

jonlorusso commented 11 years ago

Any idea how/why this file was created with the "wrong" permissions?

aptx4869 commented 8 years ago

I come across the same error when I change my umask setting to 027

# /etc/login.defs
UMASK       027
#/etc/init.d/rc
umask 027
timonde commented 8 years ago

I am using arch manjaro, the latest but one version 16.06 rc1. I've installed pam_usb and added a usb device and two users (root and m) with no errors but get this error when checking either user. I note that the problem is to do with permissions but can't find .pamusb mentioned by porelli.


[root@m m]# pamusb-check --debug m