Skip to content

Getting 'Access denied' on graphical terminals #270

@ACR36940

Description

@ACR36940

Which version of pam_usb are you running?

0.8.5

Which distribution are you using?

Linux Mint xia 22.1 x86_64

Which login manager and desktop environment are you using?

lightdm 1.30.0 DE: Cinnamon 6.4.8

What happened?

Can't authenticate on graphical terminals

sudo bash works correctly
ant@Blade ~ $ sudo bash

  • Authentication request for user "ant" (sudo)
  • Searching for "usb_autorizador" in the hardware database...
  • Authentication device "usb_autorizador" is connected.
  • Performing one time pad verification...
  • Access granted.
    root@Blade:/home/ant#
    Under sudo works ok
    root@Blade:/home/ant# pamusb-check --debug ant
  • Authentication request for user "ant" (pamusb-check)
    [src/local.c:281] Checking whether the caller (pamusb-check) is local or not...
    [src/local.c:298] Checking pid 17155 (pamusb-check)...
    [src/local.c:298] Checking pid 16979 (bash)...
    [src/local.c:298] Checking pid 16978 (sudo)...
    [src/local.c:298] Checking pid 16963 (sudo)...
    [src/local.c:298] Checking pid 16949 (bash)...
    [src/local.c:298] Checking pid 16941 (/usr/libexec/gnome-terminal-server)...
    [src/local.c:298] Checking pid 1922 (/usr/lib/systemd/systemd)...
    [src/local.c:298] Checking pid 1 (/sbin/init)...
    [src/local.c:339] Using DISPLAY :0 for utmp search
    [src/local.c:053] No utmp entry found for tty ":0"
    [src/local.c:353] Trying to get tty from display server
    [src/local.c:358] Retrying with tty /dev/tty7, obtained from display server, for utmp search
    [src/local.c:056] utmp entry for tty "tty7" found
    [src/local.c:057] utmp->ut_pid: 10433
    [src/local.c:058] utmp->ut_user: ant
    [src/local.c:073] utmp check successful, request originates from a local source!
    [src/local.c:441] No remote access detected, seems to be local request - allowing.
  • Searching for "usb_autorizador" in the hardware database...
  • Authentication device "usb_autorizador" is connected.
  • Performing one time pad verification...
    [src/volume.c:105] Searching for volume with uuid 8d4d8d3a-1614-4f81-970a-386720bb8aca.
    [src/volume.c:130] Found mount points: (null)
    [src/volume.c:145] Found volume 8d4d8d3a-1614-4f81-970a-386720bb8aca.
    [src/volume.c:044] Attempting to mount device /dev/sdb1.
    [src/volume.c:058] Mounted device /dev/sdb1 to /mnt/backup.
    [src/pad.c:317] Loading device pad...
    [src/pad.c:327] Loading system pad...
    [src/pad.c:343] Pad match.
    [src/pad.c:176] Checking whether pads are expired or not...
    [src/pad.c:204] Pads were generated 1725 seconds ago, not updating.
    [src/volume.c:196] Attempting to unmount /dev/sdb1 from /mnt/backup.
    [src/volume.c:209] Unmount succeeded.
  • Access granted.

Output of "pamusb-check --debug whoami"

* Authentication request for user "ant" (pamusb-check)
[src/local.c:281] Checking whether the caller (pamusb-check) is local or not...
[src/local.c:298] 	Checking pid  15397 (pamusb-check)...
[src/local.c:298] 	Checking pid  11152 (bash)...
[src/local.c:298] 	Checking pid  11143 (/usr/libexec/gnome-terminal-server)...
[src/local.c:298] 	Checking pid   1922 (/usr/lib/systemd/systemd)...
[src/local.c:298] 	Checking pid      1 (/sbin/init)...
[src/local.c:339] 	Using DISPLAY :0 for utmp search
[src/local.c:053] 	No utmp entry found for tty ":0"
[src/local.c:353] 	Trying to get tty from display server
[src/local.c:119] 	Determining tty by display server failed (running 'pamusb-check' as user?)
[src/local.c:363] 		Failed, no result while trying to get TTY from display server
[src/local.c:368] 	Trying to get tty by DISPLAY
[src/local.c:376] 		Failed, no result while searching utmp for display :0 owned by user ant
[src/local.c:392] 	Trying to check for remote access by loginctl
Failed to get path for session '2': No session '2' known
[src/local.c:268] 		'loginctl' returned nothing.
[src/local.c:407] 	Trying to get tty by loginctl
Failed to get path for session '2': No session '2' known
[src/local.c:224] 		'loginctl' returned nothing.
[src/local.c:418] 		Failed, could not obtain tty from loginctl - see line before this for reason.
[src/local.c:434] 	Fallback: Using TTY /dev/pts/0 from ttyname() for search
[src/local.c:053] 	No utmp entry found for tty "pts/0"
[src/local.c:445] Couldn't confirm login tty to be neither local or remote - denying.
* Access denied.

Output of "w"

22:05:39 up 50 min,  2 users,  load average: 0,92, 0,75, 0,88
USUARIO  TTY      DESDE            LOGIN@   IDLE   JCPU   PCPU  WHAT
ant               -                21:41   40:45   0.00s  0.02s lightdm --session-child 12 20

Output of "loginctl"

SESSION  UID USER SEAT  TTY  STATE   IDLE SINCE
     c2 1000 ant  seat0 tty7 closing no   -    
     c4 1000 ant  seat0 tty7 active  no   -    
2 sessions listed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions