You are not logged in.

#1 2022-05-05 11:05:12

dalu
Banned
Registered: 2014-04-16
Posts: 108

[solved] tty login: permission denied

I had this system for years.
Last time I remember I could successfully log in via tty was about 7 months ago.

On March 28, 2022 a file /etc/pam.d/login.pacnew appears

#%PAM-1.0

auth       required     pam_securetty.so
auth       requisite    pam_nologin.so
auth       include      system-local-login
account    include      system-local-login
session    include      system-local-login
password   include      system-local-login

some time earlier I remember I had issue with gnome keyring no longer automatically logging in. I even created a thread about that with no significant result.

Good thing I make backups before editing files, this time it's /etc/pam.d/login
The original contents of /etc/pam.d/login (aka login.old)

#%PAM-1.0

auth       required     pam_securetty.so
auth       requisite    pam_nologin.so
auth       include      system-local-login
auth       optional     pam_gnome_keyring.so
account    include      system-local-login
session    include      system-local-login
session    optional     pam_gnome_keyring.so auto_start

but this apparently was no longer good enough

and the new, merged /etc/pam.d/login

#%PAM-1.0

auth       required     pam_securetty.so
auth       requisite    pam_nologin.so
auth       include      system-local-login
auth       optional     pam_gnome_keyring.so
account    include      system-local-login
session    include      system-local-login
session    include      pam_gnome_keyring.so auto_start
password   include      system-local-login

I have the suspicion that those login.old and login.pacnew files cause complications, because I bet there's something like "include /etc/pam.d/*" somewhere and those files being in there cause problems.

journalctl -b -e

May 05 12:55:32 dev.luketic login[2521]: PAM _pam_load_conf_file: unable to open config for pam_gnome_keyring.so
May 05 12:55:33 dev.luketic login[2521]: gkr-pam: unable to locate daemon control file
May 05 12:55:33 dev.luketic audit[2521]: USER_AUTH pid=2521 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:authentication grantors=pam_securetty,pam_shells,pam_faillock,pam_permit,pam_faillock,pam_gnome_keyring acct="root" exe="/usr/bin>
May 05 12:55:33 dev.luketic audit[2521]: USER_ACCT pid=2521 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting grantors=pam_access,pam_unix,pam_permit,pam_time acct="root" exe="/usr/bin/login" hostname=dev.luketic addr=? terminal>
May 05 12:55:33 dev.luketic audit[2521]: CRED_ACQ pid=2521 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred grantors=pam_securetty,pam_shells,pam_faillock,pam_permit,pam_faillock,pam_gnome_keyring acct="root" exe="/usr/bin/login" >
May 05 12:55:33 dev.luketic audit[2521]: SYSCALL arch=c000003e syscall=1 success=yes exit=1 a0=5 a1=7fff6b5a3b00 a2=1 a3=0 items=0 ppid=1 pid=2521 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=tty2 ses=7 comm="login" >
May 05 12:55:33 dev.luketic audit: PROCTITLE proctitle=2F62696E2F6C6F67696E002D70002D2D
May 05 12:55:33 dev.luketic login[2521]: gkr-pam: stashed password to try later in open session
May 05 12:55:33 dev.luketic kernel: audit: type=1100 audit(1651748133.735:136): pid=2521 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:authentication grantors=pam_securetty,pam_shells,pam_faillock,pam_permit,pam_faillock,pam_gnome_keyr>
May 05 12:55:33 dev.luketic kernel: audit: type=1101 audit(1651748133.735:137): pid=2521 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting grantors=pam_access,pam_unix,pam_permit,pam_time acct="root" exe="/usr/bin/login" hostnam>
May 05 12:55:33 dev.luketic kernel: audit: type=1103 audit(1651748133.735:138): pid=2521 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred grantors=pam_securetty,pam_shells,pam_faillock,pam_permit,pam_faillock,pam_gnome_keyring acc>
May 05 12:55:33 dev.luketic kernel: audit: type=1006 audit(1651748133.735:139): pid=2521 uid=0 old-auid=4294967295 auid=0 tty=tty2 old-ses=4294967295 ses=7 res=1
May 05 12:55:33 dev.luketic kernel: audit: type=1300 audit(1651748133.735:139): arch=c000003e syscall=1 success=yes exit=1 a0=5 a1=7fff6b5a3b00 a2=1 a3=0 items=0 ppid=1 pid=2521 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid>
May 05 12:55:33 dev.luketic kernel: audit: type=1327 audit(1651748133.735:139): proctitle=2F62696E2F6C6F67696E002D70002D2D
May 05 12:55:33 dev.luketic login[2521]: pam_unix(login:session): session opened for user root(uid=0) by LOGIN(uid=0)
May 05 12:55:33 dev.luketic systemd[1]: Created slice User Slice of UID 0.
May 05 12:55:33 dev.luketic systemd[1]: Starting User Runtime Directory /run/user/0...
May 05 12:55:33 dev.luketic systemd-logind[664]: New session 7 of user root.
May 05 12:55:33 dev.luketic systemd[1]: Finished User Runtime Directory /run/user/0.
May 05 12:55:33 dev.luketic audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=user-runtime-dir@0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
May 05 12:55:33 dev.luketic kernel: audit: type=1130 audit(1651748133.752:140): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=user-runtime-dir@0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
May 05 12:55:33 dev.luketic systemd[1]: Starting User Manager for UID 0...
May 05 12:55:33 dev.luketic audit[4015]: USER_ACCT pid=4015 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting grantors=pam_access,pam_unix,pam_permit,pam_time acct="root" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal>
May 05 12:55:33 dev.luketic audit[4015]: CRED_ACQ pid=4015 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred grantors=? acct="root" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'
May 05 12:55:33 dev.luketic audit[4015]: SYSCALL arch=c000003e syscall=1 success=yes exit=1 a0=9 a1=7fff32191ec0 a2=1 a3=0 items=0 ppid=1 pid=4015 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=8 comm="(syst>
May 05 12:55:33 dev.luketic audit: PROCTITLE proctitle="(systemd)"
May 05 12:55:33 dev.luketic systemd[4015]: pam_warn(systemd-user:setcred): function=[pam_sm_setcred] flags=0x8002 service=[systemd-user] terminal=[] user=[root] ruser=[<unknown>] rhost=[<unknown>]
May 05 12:55:33 dev.luketic systemd[4015]: pam_unix(systemd-user:session): session opened for user root(uid=0) by (uid=0)
May 05 12:55:33 dev.luketic systemd[4015]: pam_env(systemd-user:session): deprecated reading of user environment enabled
May 05 12:55:33 dev.luketic audit[4015]: USER_START pid=4015 uid=0 auid=0 ses=8 msg='op=PAM:session_open grantors=pam_loginuid,pam_loginuid,pam_keyinit,pam_systemd_home,pam_limits,pam_unix,pam_permit,pam_mail,pam_systemd,pam_env acct="roo>
May 05 12:55:33 dev.luketic kernel: audit: type=1101 audit(1651748133.759:141): pid=4015 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting grantors=pam_access,pam_unix,pam_permit,pam_time acct="root" exe="/usr/lib/systemd/system>
May 05 12:55:33 dev.luketic kernel: audit: type=1103 audit(1651748133.759:142): pid=4015 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:setcred grantors=? acct="root" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=faile>
May 05 12:55:33 dev.luketic kernel: audit: type=1006 audit(1651748133.759:143): pid=4015 uid=0 old-auid=4294967295 auid=0 tty=(none) old-ses=4294967295 ses=8 res=1
May 05 12:55:33 dev.luketic audit: BPF prog-id=34 op=LOAD
May 05 12:55:33 dev.luketic audit[4015]: SYSCALL arch=c000003e syscall=321 success=yes exit=8 a0=5 a1=7ffc2a1e16d0 a2=78 a3=7ffc2a1e16d0 items=0 ppid=1 pid=4015 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses>
May 05 12:55:33 dev.luketic audit: PROCTITLE proctitle=2F7573722F6C69622F73797374656D642F73797374656D64002D2D75736572
May 05 12:55:33 dev.luketic audit: BPF prog-id=0 op=UNLOAD
May 05 12:55:33 dev.luketic audit: BPF prog-id=35 op=LOAD
May 05 12:55:33 dev.luketic audit[4015]: SYSCALL arch=c000003e syscall=321 success=yes exit=8 a0=5 a1=7ffc2a1e17a0 a2=78 a3=7ffc2a1e17a0 items=0 ppid=1 pid=4015 auid=0 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses>
May 05 12:55:33 dev.luketic audit: PROCTITLE proctitle=2F7573722F6C69622F73797374656D642F73797374656D64002D2D75736572
May 05 12:55:33 dev.luketic audit: BPF prog-id=0 op=UNLOAD
May 05 12:55:33 dev.luketic systemd[4015]: Queued start job for default target Main User Target.
May 05 12:55:33 dev.luketic systemd[4015]: Created slice User Application Slice.
May 05 12:55:33 dev.luketic systemd[4015]: Reached target Paths.
May 05 12:55:33 dev.luketic systemd[4015]: Reached target Timers.
May 05 12:55:33 dev.luketic systemd[4015]: Starting D-Bus User Message Bus Socket...
May 05 12:55:33 dev.luketic systemd[4015]: Listening on GnuPG network certificate management daemon.
May 05 12:55:33 dev.luketic systemd[4015]: Listening on GCR ssh-agent wrapper.
May 05 12:55:33 dev.luketic systemd[4015]: Listening on GnuPG cryptographic agent and passphrase cache (access for web browsers).
May 05 12:55:33 dev.luketic systemd[4015]: Listening on GnuPG cryptographic agent and passphrase cache (restricted).
May 05 12:55:33 dev.luketic systemd[4015]: Listening on GnuPG cryptographic agent (ssh-agent emulation).
May 05 12:55:33 dev.luketic systemd[4015]: Listening on GnuPG cryptographic agent and passphrase cache.
May 05 12:55:33 dev.luketic systemd[4015]: Listening on p11-kit server.
May 05 12:55:33 dev.luketic systemd[4015]: Listening on PipeWire Multimedia System Socket.
May 05 12:55:33 dev.luketic systemd[4015]: Sound System was skipped because of a failed condition check (ConditionUser=!root).
May 05 12:55:33 dev.luketic systemd[4015]: Listening on D-Bus User Message Bus Socket.
May 05 12:55:33 dev.luketic systemd[4015]: Reached target Sockets.
May 05 12:55:33 dev.luketic systemd[4015]: Reached target Basic System.
May 05 12:55:33 dev.luketic systemd[1]: Started User Manager for UID 0.
May 05 12:55:33 dev.luketic audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=user@0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
May 05 12:55:33 dev.luketic systemd[4015]: Starting Update XDG user dir configuration...
May 05 12:55:33 dev.luketic systemd[1]: Started Session 7 of User root.
May 05 12:55:33 dev.luketic systemd[4015]: Finished Update XDG user dir configuration.
May 05 12:55:33 dev.luketic systemd[4015]: Reached target Main User Target.
May 05 12:55:33 dev.luketic systemd[4015]: Startup finished in 157ms.
May 05 12:55:33 dev.luketic login[2521]: pam_env(login:session): deprecated reading of user environment enabled
May 05 12:55:33 dev.luketic audit[2521]: USER_START pid=2521 uid=0 auid=0 ses=7 msg='op=PAM:session_open grantors=? acct="root" exe="/usr/bin/login" hostname=dev.luketic addr=? terminal=/dev/tty2 res=failed'
May 05 12:55:33 dev.luketic audit[2521]: CRED_DISP pid=2521 uid=0 auid=0 ses=7 msg='op=PAM:setcred grantors=pam_securetty,pam_shells,pam_faillock,pam_permit,pam_faillock,pam_gnome_keyring acct="root" exe="/usr/bin/login" hostname=dev.luke>
May 05 12:55:33 dev.luketic login[2521]: Permission denied
May 05 12:55:36 dev.luketic systemd[1]: getty@tty2.service: Deactivated successfully.
May 05 12:55:36 dev.luketic audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=getty@tty2 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
May 05 12:55:36 dev.luketic systemd[1]: session-7.scope: Deactivated successfully.
May 05 12:55:36 dev.luketic systemd[1]: getty@tty2.service: Scheduled restart job, restart counter is at 3.
May 05 12:55:36 dev.luketic systemd[1]: Stopped Getty on tty2.
May 05 12:55:36 dev.luketic audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=getty@tty2 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
May 05 12:55:36 dev.luketic audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=getty@tty2 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
May 05 12:55:36 dev.luketic systemd-logind[664]: Session 7 logged out. Waiting for processes to exit.
May 05 12:55:36 dev.luketic systemd[1]: Started Getty on tty2.
May 05 12:55:36 dev.luketic audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=getty@tty2 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
May 05 12:55:36 dev.luketic systemd-logind[664]: Removed session 7.
May 05 12:55:38 dev.luketic acpid[659]: client connected from 728[0:0]
May 05 12:55:38 dev.luketic acpid[659]: 1 client rule loaded
May 05 12:55:38 dev.luketic root[4031]: ACPI group/action undefined: jack/lineout / LINEOUT
May 05 12:55:38 dev.luketic root[4033]: ACPI group/action undefined: jack/videoout / VIDEOOUT
May 05 12:55:38 dev.luketic acpid[659]: client connected from 728[0:0]
May 05 12:55:38 dev.luketic acpid[659]: 1 client rule loaded
May 05 12:55:38 dev.luketic root[4035]: ACPI group/action undefined: jack/lineout / LINEOUT
May 05 12:55:38 dev.luketic root[4037]: ACPI group/action undefined: jack/videoout / VIDEOOUT

too bad we can't post colored journal logs.

https://bbs.archlinux.org/viewtopic.php … 4#p1837564
says that
May 05 12:55:32 dev.luketic login[2521]: PAM _pam_load_conf_file: unable to open config for pam_gnome_keyring.so
May 05 12:55:33 dev.luketic login[2521]: gkr-pam: unable to locate daemon control file
blocked him from logging into his system.

How does one debug pam issues?

up1: the suspition didn't prove to be correct.

Last edited by dalu (2022-05-05 11:13:34)

Offline

#2 2022-05-05 11:15:38

dalu
Banned
Registered: 2014-04-16
Posts: 108

Re: [solved] tty login: permission denied

solved by

#%PAM-1.0

auth       required     pam_securetty.so
auth       requisite    pam_nologin.so
auth       include      system-local-login
auth       optional     pam_gnome_keyring.so
account    include      system-local-login
session    include      system-local-login
password   include      system-local-login
session    optional     pam_gnome_keyring.so auto_start
session    optional     pam_gnome_keyring.so auto_start

not

session    include     pam_gnome_keyring.so auto_start

Offline

#3 2022-05-05 11:17:02

dalu
Banned
Registered: 2014-04-16
Posts: 108

Re: [solved] tty login: permission denied

Still

gkr-pam: unable to locate daemon control file

I don't like this. it's red in the journal log.

Offline

#4 2022-05-05 13:50:17

dogknowsnx
Guest

Re: [solved] tty login: permission denied

dalu wrote:

Still

gkr-pam: unable to locate daemon control file

I don't like this. it's red in the journal log.

https://bbs.archlinux.org/viewtopic.php?id=261156
https://gitlab.gnome.org/GNOME/gnome-ke … /issues/28

Board footer

Powered by FluxBB