agent event not working in pamusb-conf
I have Sandisk USB and I got an issue :- I tried configuring /etc/security/pam_usb.conf block to following :-
<user id="balpreet">
<device>SANDISK</device>
<agent event="lock">
<cmd>cinnamon-screensaver-command -l</cmd>
</agent>
<!-- Resume operations when the usb device is plugged back and authenticated -->
<agent event="unlock">
<cmd>cinnamon-screensaver-command --deactivate</cmd>
</agent>
</user>
The authentication works perfect but when i plug out the usb, it doesnot locks it and neither unlocks when i plug in it
Second. When I execute pamusb-check --debug balpreet I get this :-
* Authentication request for user "balpreet" (pamusb-check)
[src/local.c:227] Checking whether the caller (pamusb-check) is local or not...
[src/local.c:238] Checking pid 7977 (pamusb-check)...
[src/local.c:238] Checking pid 7947 (bash)...
[src/local.c:238] Checking pid 7922 (/usr/libexec/gnome-terminal-server)...
[src/local.c:238] Checking pid 1231 (/lib/systemd/systemd)...
[src/local.c:238] Checking pid 1 (/sbin/init)...
[src/local.c:296] Using DISPLAY :0 for utmp search
[src/local.c:050] No utmp entry found for tty ":0"
[src/local.c:312] Trying to get tty from display server
[src/local.c:121] Determining tty by display server failed (running 'pamusb-check' as user?)
[src/local.c:322] Failed, no result while trying to get TTY from display server
[src/local.c:327] Trying to get tty by DISPLAY
[src/local.c:335] Failed, no result while searching utmp for display :0 owned by user balpreet
[src/local.c:344] Trying to get tty by loginctl
sh: 1: Syntax error: "(" unexpected
[src/local.c:214] 'loginctl' returned nothing.'
[src/local.c:355] Failed, no result while searching utmp for tty (null)
[src/local.c:367] Fallback: Using TTY /dev/pts/0 from ttyname() for search
[src/local.c:050] No utmp entry found for tty "pts/0"
[src/local.c:378] Couldn't confirm login tty to be neither local or remote - denying.
* Access denied.
There is a reason there is an support template for new issues. Can't help like that.
Missing:
- Output of
w - Output of
loginctl - Distribution
- displaymanager or shell login and manual x
- installed from package or source
- agent log
edit: also you shouldnt open issues for this in unrelated projects (talking about https://github.com/aluzzardi/pam_usb/issues/51 here)
idk w but i typed w in console and got this :-
15:17:07 up 3:00, 1 user, load average: 1.42, 0.57, 0.47
USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
balpreet tty7 :0 12:19 3:00m 8:48 2.28s cinnamon-sessio
loginctl :-
SESSION UID USER SEAT TTY
c2 1000 balpreet seat0
1 sessions listed.
Also please tell what else you want and how to get it so that i can get helped. Thx for replying
I am really sorry about posting in somewhere else. I searched pamusb and accidently got that. Then i opened /etc/security/pam_usb.conf and found at that the one I am using is mcdope. Sorry for that. BTW how you know about it??
"BTW how you know about it??" You're not the only one opening issues in the original repo, so I started to monitor the RSS Feed for Aluz original project and Google Alerts etc pp :laughing: In fact, I often opened MRs for my own repo in his instead too haha. Everyone messes that up at least once so dont worry ^^
Which distribution are you using? So i can create a VM to repro... I guess I need to add cinnamon to the "tty by display server" checks.
btw, could be worth to try the nightly build - there are some small fixes contained that aren't in the last official release. But they should be unrelated to your issue.
Closed because lack of feedback. In case you still encounter this with the current nightly build please open a new issue with all required informations.