You are not logged in.

#1 2022-04-25 09:59:36

zhisme
Member
From: Saint-Petersburg
Registered: 2022-03-24
Posts: 9
Website

Can't login on TTY1

Hi everyone,

from the subject I can't login on TTY1, it just writes on the screen

 
Started Getty on tty1
Stopped Getty on tty1

I don't know where to dig, what logs to see or how to debug, but it just skips login service. I tried to see journalctl but there's nothing interesting.
However some tips, I think it is somehow related to Xserver, but I can't find stacktrace for it, what's being broken on TTY1

Currently I have workaround, that when I have login screen, I just go to TTY2 and login there, my .zprofile is looking like so. I'm using zsh shell

[[ -f ~/.zshrc ]] && . ~/.zshrc

TTY="$(/usr/bin/tty | sed 's:.*/::')"
if [[ ! ${DISPLAY} && ${TERM} == 'linux' && ${TTY} == 'tty2' ]]; then
  unset TTY
  exec startx
fi

# ... omitted

unset TTY

And one interesting and weird thing, once I logged via TTY2, I can navigate to TTY1 with ctrl+alt+f1, and then login with no problem. When I'm not logged in in TTY2, it just getting pops out the message "Started/Stopped getty on TTY1"


“To go wrong in one's own way is better than to go right in someone else's.” ― Fyodor Dostoevsky, Crime and Punishment

Offline

#2 2022-04-25 11:41:49

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,691

Re: Can't login on TTY1

What's the getty and do you attempt anything like https://wiki.archlinux.org/title/Getty# … al_console ?

Offline

#3 2022-04-25 11:47:45

zhisme
Member
From: Saint-Petersburg
Registered: 2022-03-24
Posts: 9
Website

Re: Can't login on TTY1

Nope, I don't have any auto login

that's the only file I have for getty

$: ll /etc/systemd/system/getty.target.wants/getty@tty1.service                
lrwxrwxrwx 1 root root 38 Mar 18 23:25 /etc/systemd/system/getty.target.wants/getty@tty1.service -> /usr/lib/systemd/system/getty@.service

contents are

#  SPDX-License-Identifier: LGPL-2.1-or-later
#
#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=Getty on %I
Documentation=man:agetty(8) man:systemd-getty-generator(8)
Documentation=http://0pointer.de/blog/projects/serial-console.html
After=systemd-user-sessions.service plymouth-quit-wait.service getty-pre.target

# If additional gettys are spawned during boot then we should make
# sure that this is synchronized before getty.target, even though
# getty.target didn't actually pull it in.
Before=getty.target
IgnoreOnIsolate=yes

# IgnoreOnIsolate causes issues with sulogin, if someone isolates
# rescue.target or starts rescue.service from multi-user.target or
# graphical.target.
Conflicts=rescue.service
Before=rescue.service

# On systems without virtual consoles, don't start any getty. Note
# that serial gettys are covered by serial-getty@.service, not this
# unit.
ConditionPathExists=/dev/tty0

[Service]
# the VT is cleared by TTYVTDisallocate
# The '-o' option value tells agetty to replace 'login' arguments with an
# option to preserve environment (-p), followed by '--' for safety, and then
# the entered username.
ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear - $TERM
Type=idle
Restart=always
RestartSec=0
UtmpIdentifier=%I
StandardInput=tty
StandardOutput=tty
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes
IgnoreSIGPIPE=no
SendSIGHUP=yes

# Unset locale for the console getty since the console has problems
# displaying some internationalized messages.
UnsetEnvironment=LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION

[Install]
WantedBy=getty.target
DefaultInstance=tty1

“To go wrong in one's own way is better than to go right in someone else's.” ― Fyodor Dostoevsky, Crime and Punishment

Offline

#4 2022-04-25 12:29:31

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,691

Re: Can't login on TTY1

Do you have some failing DM enabled?
Check the system journal on whether and why the getty crash-restarts.

Offline

#5 2022-04-25 13:19:27

zhisme
Member
From: Saint-Petersburg
Registered: 2022-03-24
Posts: 9
Website

Re: Can't login on TTY1

maybe you can tell me what's wrong there. I just see that it opens it and then closes session with no reason, or at least I can't figure out where it is failing.
I have included journalctl logs from TTY1 until TTY2 where I can login successfully

Apr 25 16:09:41 arch-zh audit[23498]: USER_AUTH pid=23498 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="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty1 res=success'
Apr 25 16:09:41 arch-zh audit[23498]: USER_ACCT pid=23498 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting grantors=pam_access,pam_unix,pam_permit,pam_time acct="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty1 res=success'
Apr 25 16:09:41 arch-zh login[23498]: gkr-pam: stashed password to try later in open session
Apr 25 16:09:41 arch-zh audit[23498]: CRED_ACQ pid=23498 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="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty1 res=success'
Apr 25 16:09:41 arch-zh audit[23498]: SYSCALL arch=c000003e syscall=1 success=yes exit=4 a0=5 a1=7ffef15eecc0 a2=4 a3=0 items=0 ppid=1 pid=23498 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=984 fsgid=0 tty=tty1 ses=10 comm="login" exe="/usr/bin/login" key=(null)
Apr 25 16:09:41 arch-zh audit: PROCTITLE proctitle=2F62696E2F6C6F67696E002D70002D2D
Apr 25 16:09:41 arch-zh login[23498]: pam_unix(login:session): session opened for user zh(uid=1000) by LOGIN(uid=0)
Apr 25 16:09:41 arch-zh kernel: audit: type=1100 audit(1650892181.635:264): pid=23498 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="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty1 res=success'
Apr 25 16:09:41 arch-zh kernel: audit: type=1101 audit(1650892181.635:265): pid=23498 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting grantors=pam_access,pam_unix,pam_permit,pam_time acct="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty1 res=success'
Apr 25 16:09:41 arch-zh kernel: audit: type=1103 audit(1650892181.635:266): pid=23498 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="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty1 res=success'
Apr 25 16:09:41 arch-zh kernel: audit: type=1006 audit(1650892181.635:267): pid=23498 uid=0 old-auid=4294967295 auid=1000 tty=tty1 old-ses=4294967295 ses=10 res=1
Apr 25 16:09:41 arch-zh kernel: audit: type=1300 audit(1650892181.635:267): arch=c000003e syscall=1 success=yes exit=4 a0=5 a1=7ffef15eecc0 a2=4 a3=0 items=0 ppid=1 pid=23498 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=984 fsgid=0 tty=tty1 ses=10 comm="login" exe="/usr/bin/login" key=(null)
Apr 25 16:09:41 arch-zh kernel: audit: type=1327 audit(1650892181.635:267): proctitle=2F62696E2F6C6F67696E002D70002D2D
Apr 25 16:09:41 arch-zh systemd-logind[559]: New session 10 of user zh.
Apr 25 16:09:41 arch-zh systemd[1]: Started Session 10 of User zh.
Apr 25 16:09:41 arch-zh login[23498]: pam_env(login:session): deprecated reading of user environment enabled
Apr 25 16:09:41 arch-zh login[23498]: gkr-pam: gnome-keyring-daemon started properly and unlocked keyring
Apr 25 16:09:41 arch-zh audit[23498]: USER_START pid=23498 uid=0 auid=1000 ses=10 msg='op=PAM:session_open grantors=pam_loginuid,pam_keyinit,pam_systemd_home,pam_limits,pam_unix,pam_permit,pam_mail,pam_systemd,pam_env,pam_gnome_keyring acct="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty1 res=success'
Apr 25 16:09:41 arch-zh audit[23498]: CRED_REFR pid=23498 uid=0 auid=1000 ses=10 msg='op=PAM:setcred grantors=pam_securetty,pam_shells,pam_faillock,pam_permit,pam_faillock,pam_gnome_keyring acct="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty1 res=success'
Apr 25 16:09:41 arch-zh login[23498]: LOGIN ON tty1 BY zh
Apr 25 16:09:41 arch-zh kernel: audit: type=1105 audit(1650892181.672:268): pid=23498 uid=0 auid=1000 ses=10 msg='op=PAM:session_open grantors=pam_loginuid,pam_keyinit,pam_systemd_home,pam_limits,pam_unix,pam_permit,pam_mail,pam_systemd,pam_env,pam_gnome_keyring acct="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty1 res=success'
Apr 25 16:09:41 arch-zh kernel: audit: type=1110 audit(1650892181.672:269): pid=23498 uid=0 auid=1000 ses=10 msg='op=PAM:setcred grantors=pam_securetty,pam_shells,pam_faillock,pam_permit,pam_faillock,pam_gnome_keyring acct="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty1 res=success'
Apr 25 16:09:41 arch-zh audit[23498]: CRED_DISP pid=23498 uid=0 auid=1000 ses=10 msg='op=PAM:setcred grantors=pam_securetty,pam_shells,pam_faillock,pam_permit,pam_faillock,pam_gnome_keyring acct="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty1 res=success'
Apr 25 16:09:41 arch-zh login[23498]: pam_unix(login:session): session closed for user zh
Apr 25 16:09:41 arch-zh audit[23498]: USER_END pid=23498 uid=0 auid=1000 ses=10 msg='op=PAM:session_close grantors=pam_loginuid,pam_keyinit,pam_systemd_home,pam_limits,pam_unix,pam_permit,pam_mail,pam_systemd,pam_env,pam_gnome_keyring acct="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty1 res=success'
Apr 25 16:09:41 arch-zh systemd[1]: getty@tty1.service: Deactivated successfully.
Apr 25 16:09:41 arch-zh audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=getty@tty1 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Apr 25 16:09:41 arch-zh kernel: audit: type=1104 audit(1650892181.682:270): pid=23498 uid=0 auid=1000 ses=10 msg='op=PAM:setcred grantors=pam_securetty,pam_shells,pam_faillock,pam_permit,pam_faillock,pam_gnome_keyring acct="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty1 res=success'
Apr 25 16:09:41 arch-zh kernel: audit: type=1106 audit(1650892181.682:271): pid=23498 uid=0 auid=1000 ses=10 msg='op=PAM:session_close grantors=pam_loginuid,pam_keyinit,pam_systemd_home,pam_limits,pam_unix,pam_permit,pam_mail,pam_systemd,pam_env,pam_gnome_keyring acct="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty1 res=success'
Apr 25 16:09:41 arch-zh systemd-logind[559]: Session 10 logged out. Waiting for processes to exit.
Apr 25 16:09:41 arch-zh systemd[1]: getty@tty1.service: Scheduled restart job, restart counter is at 5.
Apr 25 16:09:41 arch-zh systemd[1]: Stopped Getty on tty1.
Apr 25 16:09:41 arch-zh audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=getty@tty1 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Apr 25 16:09:41 arch-zh audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=getty@tty1 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Apr 25 16:09:41 arch-zh systemd[1]: Started Getty on tty1.
Apr 25 16:09:41 arch-zh audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=getty@tty1 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Apr 25 16:09:44 arch-zh systemd[1]: session-10.scope: Deactivated successfully.
Apr 25 16:09:44 arch-zh systemd-logind[559]: Removed session 10.
Apr 25 16:09:46 arch-zh dbus-daemon[556]: [system] Activating via systemd: service name='org.freedesktop.home1' unit='dbus-org.freedesktop.home1.service' requested by ':1.128' (uid=0 pid=25954 comm="/bin/login -p --   ")
Apr 25 16:09:46 arch-zh dbus-daemon[556]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.home1.service': Unit dbus-org.freedesktop.home1.service not found.
Apr 25 16:09:46 arch-zh login[25954]: pam_systemd_home(login:auth): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
Apr 25 16:09:46 arch-zh login[25954]: gkr-pam: unable to locate daemon control file
Apr 25 16:09:46 arch-zh audit[25954]: USER_AUTH pid=25954 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="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty2 res=success'
Apr 25 16:09:46 arch-zh audit[25954]: USER_ACCT pid=25954 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting grantors=pam_access,pam_unix,pam_permit,pam_time acct="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty2 res=success'
Apr 25 16:09:46 arch-zh login[25954]: gkr-pam: stashed password to try later in open session
Apr 25 16:09:46 arch-zh audit[25954]: CRED_ACQ pid=25954 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="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty2 res=success'
Apr 25 16:09:46 arch-zh audit[25954]: SYSCALL arch=c000003e syscall=1 success=yes exit=4 a0=5 a1=7ffe97706320 a2=4 a3=0 items=0 ppid=1 pid=25954 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=984 fsgid=0 tty=tty2 ses=11 comm="login" exe="/usr/bin/login" key=(null)
Apr 25 16:09:46 arch-zh audit: PROCTITLE proctitle=2F62696E2F6C6F67696E002D70002D2D
Apr 25 16:09:46 arch-zh login[25954]: pam_unix(login:session): session opened for user zh(uid=1000) by LOGIN(uid=0)
Apr 25 16:09:46 arch-zh kernel: kauditd_printk_skb: 4 callbacks suppressed
Apr 25 16:09:46 arch-zh kernel: audit: type=1100 audit(1650892186.975:276): pid=25954 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="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty2 res=success'
Apr 25 16:09:46 arch-zh kernel: audit: type=1101 audit(1650892186.975:277): pid=25954 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting grantors=pam_access,pam_unix,pam_permit,pam_time acct="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty2 res=success'
Apr 25 16:09:46 arch-zh kernel: audit: type=1103 audit(1650892186.975:278): pid=25954 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="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty2 res=success'
Apr 25 16:09:46 arch-zh kernel: audit: type=1006 audit(1650892186.975:279): pid=25954 uid=0 old-auid=4294967295 auid=1000 tty=tty2 old-ses=4294967295 ses=11 res=1
Apr 25 16:09:46 arch-zh kernel: audit: type=1300 audit(1650892186.975:279): arch=c000003e syscall=1 success=yes exit=4 a0=5 a1=7ffe97706320 a2=4 a3=0 items=0 ppid=1 pid=25954 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=984 fsgid=0 tty=tty2 ses=11 comm="login" exe="/usr/bin/login" key=(null)
Apr 25 16:09:46 arch-zh kernel: audit: type=1327 audit(1650892186.975:279): proctitle=2F62696E2F6C6F67696E002D70002D2D
Apr 25 16:09:46 arch-zh systemd-logind[559]: New session 11 of user zh.
Apr 25 16:09:46 arch-zh systemd[1]: Started Session 11 of User zh.
Apr 25 16:09:47 arch-zh login[25954]: pam_env(login:session): deprecated reading of user environment enabled
Apr 25 16:09:47 arch-zh login[25954]: gkr-pam: gnome-keyring-daemon started properly and unlocked keyring
Apr 25 16:09:47 arch-zh audit[25954]: USER_START pid=25954 uid=0 auid=1000 ses=11 msg='op=PAM:session_open grantors=pam_loginuid,pam_keyinit,pam_systemd_home,pam_limits,pam_unix,pam_permit,pam_mail,pam_systemd,pam_env,pam_gnome_keyring acct="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty2 res=success'
Apr 25 16:09:47 arch-zh kernel: audit: type=1105 audit(1650892187.002:280): pid=25954 uid=0 auid=1000 ses=11 msg='op=PAM:session_open grantors=pam_loginuid,pam_keyinit,pam_systemd_home,pam_limits,pam_unix,pam_permit,pam_mail,pam_systemd,pam_env,pam_gnome_keyring acct="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty2 res=success'
Apr 25 16:09:47 arch-zh kernel: audit: type=1110 audit(1650892187.002:281): pid=25954 uid=0 auid=1000 ses=11 msg='op=PAM:setcred grantors=pam_securetty,pam_shells,pam_faillock,pam_permit,pam_faillock,pam_gnome_keyring acct="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty2 res=success'
Apr 25 16:09:47 arch-zh audit[25954]: CRED_REFR pid=25954 uid=0 auid=1000 ses=11 msg='op=PAM:setcred grantors=pam_securetty,pam_shells,pam_faillock,pam_permit,pam_faillock,pam_gnome_keyring acct="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty2 res=success'
Apr 25 16:09:47 arch-zh login[25954]: LOGIN ON tty2 BY zh

“To go wrong in one's own way is better than to go right in someone else's.” ― Fyodor Dostoevsky, Crime and Punishment

Offline

#6 2022-04-25 13:25:48

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,691

Re: Can't login on TTY1

Apr 25 16:09:41 arch-zh audit[23498]: USER_AUTH pid=23498 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="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty1 res=success'
Apr 25 16:09:41 arch-zh audit[23498]: USER_ACCT pid=23498 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting grantors=pam_access,pam_unix,pam_permit,pam_time acct="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty1 res=success'
Apr 25 16:09:41 arch-zh login[23498]: gkr-pam: stashed password to try later in open session
Apr 25 16:09:41 arch-zh audit[23498]: CRED_ACQ pid=23498 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="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty1 res=success'
Apr 25 16:09:41 arch-zh audit[23498]: SYSCALL arch=c000003e syscall=1 success=yes exit=4 a0=5 a1=7ffef15eecc0 a2=4 a3=0 items=0 ppid=1 pid=23498 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=984 fsgid=0 tty=tty1 ses=10 comm="login" exe="/usr/bin/login" key=(null)
Apr 25 16:09:41 arch-zh audit: PROCTITLE proctitle=2F62696E2F6C6F67696E002D70002D2D
Apr 25 16:09:41 arch-zh login[23498]: pam_unix(login:session): session opened for user zh(uid=1000) by LOGIN(uid=0)
Apr 25 16:09:41 arch-zh kernel: audit: type=1100 audit(1650892181.635:264): pid=23498 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="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty1 res=success'
Apr 25 16:09:41 arch-zh kernel: audit: type=1101 audit(1650892181.635:265): pid=23498 uid=0 auid=4294967295 ses=4294967295 msg='op=PAM:accounting grantors=pam_access,pam_unix,pam_permit,pam_time acct="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty1 res=success'
Apr 25 16:09:41 arch-zh kernel: audit: type=1103 audit(1650892181.635:266): pid=23498 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="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty1 res=success'
Apr 25 16:09:41 arch-zh kernel: audit: type=1006 audit(1650892181.635:267): pid=23498 uid=0 old-auid=4294967295 auid=1000 tty=tty1 old-ses=4294967295 ses=10 res=1
Apr 25 16:09:41 arch-zh kernel: audit: type=1300 audit(1650892181.635:267): arch=c000003e syscall=1 success=yes exit=4 a0=5 a1=7ffef15eecc0 a2=4 a3=0 items=0 ppid=1 pid=23498 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=984 fsgid=0 tty=tty1 ses=10 comm="login" exe="/usr/bin/login" key=(null)
Apr 25 16:09:41 arch-zh kernel: audit: type=1327 audit(1650892181.635:267): proctitle=2F62696E2F6C6F67696E002D70002D2D
Apr 25 16:09:41 arch-zh systemd-logind[559]: New session 10 of user zh.
Apr 25 16:09:41 arch-zh systemd[1]: Started Session 10 of User zh.
Apr 25 16:09:41 arch-zh login[23498]: pam_env(login:session): deprecated reading of user environment enabled
Apr 25 16:09:41 arch-zh login[23498]: gkr-pam: gnome-keyring-daemon started properly and unlocked keyring
Apr 25 16:09:41 arch-zh audit[23498]: USER_START pid=23498 uid=0 auid=1000 ses=10 msg='op=PAM:session_open grantors=pam_loginuid,pam_keyinit,pam_systemd_home,pam_limits,pam_unix,pam_permit,pam_mail,pam_systemd,pam_env,pam_gnome_keyring acct="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty1 res=success'
Apr 25 16:09:41 arch-zh audit[23498]: CRED_REFR pid=23498 uid=0 auid=1000 ses=10 msg='op=PAM:setcred grantors=pam_securetty,pam_shells,pam_faillock,pam_permit,pam_faillock,pam_gnome_keyring acct="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty1 res=success'
Apr 25 16:09:41 arch-zh login[23498]: LOGIN ON tty1 BY zh
Apr 25 16:09:41 arch-zh kernel: audit: type=1105 audit(1650892181.672:268): pid=23498 uid=0 auid=1000 ses=10 msg='op=PAM:session_open grantors=pam_loginuid,pam_keyinit,pam_systemd_home,pam_limits,pam_unix,pam_permit,pam_mail,pam_systemd,pam_env,pam_gnome_keyring acct="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty1 res=success'
Apr 25 16:09:41 arch-zh kernel: audit: type=1110 audit(1650892181.672:269): pid=23498 uid=0 auid=1000 ses=10 msg='op=PAM:setcred grantors=pam_securetty,pam_shells,pam_faillock,pam_permit,pam_faillock,pam_gnome_keyring acct="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty1 res=success'
Apr 25 16:09:41 arch-zh audit[23498]: CRED_DISP pid=23498 uid=0 auid=1000 ses=10 msg='op=PAM:setcred grantors=pam_securetty,pam_shells,pam_faillock,pam_permit,pam_faillock,pam_gnome_keyring acct="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty1 res=success'
Apr 25 16:09:41 arch-zh login[23498]: pam_unix(login:session): session closed for user zh
Apr 25 16:09:41 arch-zh audit[23498]: USER_END pid=23498 uid=0 auid=1000 ses=10 msg='op=PAM:session_close grantors=pam_loginuid,pam_keyinit,pam_systemd_home,pam_limits,pam_unix,pam_permit,pam_mail,pam_systemd,pam_env,pam_gnome_keyring acct="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty1 res=success'
Apr 25 16:09:41 arch-zh systemd[1]: getty@tty1.service: Deactivated successfully.
Apr 25 16:09:41 arch-zh audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=getty@tty1 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Apr 25 16:09:41 arch-zh kernel: audit: type=1104 audit(1650892181.682:270): pid=23498 uid=0 auid=1000 ses=10 msg='op=PAM:setcred grantors=pam_securetty,pam_shells,pam_faillock,pam_permit,pam_faillock,pam_gnome_keyring acct="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty1 res=success'
Apr 25 16:09:41 arch-zh kernel: audit: type=1106 audit(1650892181.682:271): pid=23498 uid=0 auid=1000 ses=10 msg='op=PAM:session_close grantors=pam_loginuid,pam_keyinit,pam_systemd_home,pam_limits,pam_unix,pam_permit,pam_mail,pam_systemd,pam_env,pam_gnome_keyring acct="zh" exe="/usr/bin/login" hostname=arch-zh addr=? terminal=/dev/tty1 res=success'
Apr 25 16:09:41 arch-zh systemd-logind[559]: Session 10 logged out. Waiting for processes to exit.

You login on TTY1 and then the getty gets terminated.
Please clarify whether you get to enter your credentials, but then just don't get a shell or whether you think you can't even try to login on TTY1.
Also post your entire zprofile, zshrc and zhenv

Last edited by seth (2022-04-25 13:27:00)

Offline

#7 2022-04-25 13:38:12

zhisme
Member
From: Saint-Petersburg
Registered: 2022-03-24
Posts: 9
Website

Re: Can't login on TTY1

Please clarify whether you get to enter your credentials, but then just don't get a shell or whether you think you can't even try to login on TTY1.

yes, I don't have a shell. but expected result to start mine window manager or at least zshell

.zshenv

. "$HOME/.cargo/env"

.zshrc

export ZSH="$HOME/.oh-my-zsh"

ZSH_THEME="geoffgarside"

if [ -f ~/.bash_aliases ]; then
    . ~/.bash_aliases
fi

eval "$(rbenv init -)"

plugins=(
  git
  common-aliases
  z
  zsh-syntax-highlighting
)

source ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

export PATH="$HOME/.cargo/bin:$PATH"

bindkey "^[[1;3C" forward-word
bindkey "^[[1;3D" backward-word

autoload -U promptinit; promptinit
prompt pure > /dev/null

source $ZSH/oh-my-zsh.sh

zprofile

[[ -f ~/.zshrc ]] && . ~/.zshrc

TTY="$(/usr/bin/tty | sed 's:.*/::')"
if [[ ! ${DISPLAY} && ${TERM} == 'linux' && ${TTY} == 'tty2' ]]; then
  unset TTY
  exec startx
fi

if (( $+commands[luarocks] )); then
    eval `luarocks path --bin`
fi

if [ -n "$DESKTOP_SESSION" ];then
    eval $(gnome-keyring-daemon --start)
    export SSH_AUTH_SOCK
fi
unset TTY

here is workaround in zprofile to start startx on tty2

if [[ ! ${DISPLAY} && ${TERM} == 'linux' && ${TTY} == 'tty2' ]]; then
  unset TTY
  exec startx
fi

“To go wrong in one's own way is better than to go right in someone else's.” ― Fyodor Dostoevsky, Crime and Punishment

Offline

#8 2022-04-25 13:43:17

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,691

Re: Can't login on TTY1

Contents of "$HOME/.cargo/env" ?

Comment the lines that source OMZ and the "eval" stuff.
As next step, comment "[[ -f ~/.zshrc ]] && . ~/.zshrc" in zprofile.

See whether that helps.
You do login on TTY1, you just log out instantly again.

Offline

#9 2022-04-25 14:21:16

zhisme
Member
From: Saint-Petersburg
Registered: 2022-03-24
Posts: 9
Website

Re: Can't login on TTY1

sorry I can't get how it would help, if all of that works correctly on tty2?

I commented everything from zprofile and zshrc, and no result. I think the problem is somewhere else not in zsh

contents of cargo/env

#!/bin/sh
# rustup shell setup
# affix colons on either side of $PATH to simplify matching
case ":${PATH}:" in
    *:"$HOME/.cargo/bin":*)
        ;;
    *)
        # Prepending path in case a system-installed rustc needs to be overridden
        export PATH="$HOME/.cargo/bin:$PATH"
        ;;
esac

“To go wrong in one's own way is better than to go right in someone else's.” ― Fyodor Dostoevsky, Crime and Punishment

Offline

#10 2022-04-25 14:35:57

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,691

Re: Can't login on TTY1

conditional path, depending on the TTY  - the cause migth possibly in /etc/profile* or ~/.profile - there's also ~/.zlogin
You can also try "chsh -s /usr/bin/bash" and the behavior for a different user account.

You do login and that should start your shell (you can add "tty >> /tmp/tty.logins" to the head fo .zshenv to verify that) but then immediately logout, what implies the shell immediately exits - for "reasons".
Another debugging approach would be to prepend

exec > /tmp/zsh.debug
exec 2>&1
set -x

Offline

#11 2022-04-25 15:18:19

zhisme
Member
From: Saint-Petersburg
Registered: 2022-03-24
Posts: 9
Website

Re: Can't login on TTY1

I also cannot login via root on tty1, fyi

contents of /tmp/tty.logins

not a tty
not a tty
not a tty
not a tty
not a tty
not a tty
not a tty
not a tty
not a tty
not a tty
/dev/tty1
/dev/tty2
not a tty
not a tty
/dev/pts/0
/dev/pts/0
not a tty
not a tty
not a tty
not a tty
not a tty
not a tty

contents of /tmp/zsh.debug

+/home/zh/.zshenv:5> . /home/zh/.cargo/env
+/home/zh/.cargo/env:4> case :/usr/local/sbin:/usr/local/bin:/usr/bin: (*:/home/zh/.cargo/bin:*)
+/home/zh/.cargo/env:4> case :/usr/local/sbin:/usr/local/bin:/usr/bin: (*)
+/home/zh/.cargo/env:9> export PATH=/home/zh/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin
+/etc/zsh/zprofile:1> emulate sh -c 'source /etc/profile'
+/etc/zsh/zprofile:1> source /etc/profile
+/etc/profile:5> umask 022
+/etc/profile:19> append_path /usr/local/sbin
+append_path:19> case :/home/zh/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin: (*:/usr/local/sbin:*)
+/etc/profile:20> append_path /usr/local/bin
+append_path:20> case :/home/zh/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin: (*:/usr/local/bin:*)
+/etc/profile:21> append_path /usr/bin
+append_path:21> case :/home/zh/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin: (*:/usr/bin:*)
+/etc/profile:24> export PATH
+/etc/profile:32> test -d /etc/profile.d/
+/etc/profile:32> profile=/etc/profile.d/cdm.sh
+/etc/profile:32> test -r /etc/profile.d/cdm.sh
+/etc/profile:32> . /etc/profile.d/cdm.sh
+/etc/profile.d/cdm.sh:6> tty
+/etc/profile.d/cdm.sh:6> [ /dev/tty1 '=' /dev/tty1 ']'
+/etc/profile.d/cdm.sh:6> [ -n '' ']'
+/etc/profile.d/cdm.sh:6> pgrep xinit
+/etc/profile.d/cdm.sh:6> [ -z '' ']'
+/etc/profile.d/cdm.sh:6> cdm
/etc/profile.d/cdm.sh:6: command not found: cdm

seems clear now, some remainings of cdm blocking logging in on tty1

I was looking for this kind of debug and couldn't find it anywhere, you have helped a lot
great thanks seth !!


“To go wrong in one's own way is better than to go right in someone else's.” ― Fyodor Dostoevsky, Crime and Punishment

Offline

Board footer

Powered by FluxBB