Greetd unable to login & elogind error
System
- xuname:
Void 5.16.11_1 x86_64 AuthenticAMD uptodate rrrmFFFFFFFFFF - package:
greetd-0.8.0_1
Expected behavior
Be able to login through agreety.
Actual behavior
In TTY itself, I'm getting "This account is not currently available" when logging in as my user. Trying to login in as root gave me an incorrect password error, but the password is 100% correct (checked).
svlogtail shows me the following errors for greetd and elogind:
2022-02-27T00:57:29.36204 authpriv.err: Feb 27 01:57:29 greetd: pam_securetty(greetd:auth): cannot determine user's tty
2022-02-27T00:57:29.70479 auth.err: Feb 27 01:57:29 elogind[1653]: elogind is already running as PID 1236
2022-02-27T00:57:30.70925 auth.err: Feb 27 01:57:30 elogind[1661]: elogind is already running as PID 1236
2022-02-27T00:57:31.71351 auth.err: Feb 27 01:57:31 elogind[1668]: elogind is already running as PID 1236
2022-02-27T00:57:32.71825 auth.err: Feb 27 01:57:32 elogind[1675]: elogind is already running as PID 1236
2022-02-27T00:57:33.72263 auth.err: Feb 27 01:57:33 elogind[1682]: elogind is already running as PID 1236
2022-02-27T00:57:34.72692 auth.err: Feb 27 01:57:34 elogind[1690]: elogind is already running as PID 1236
2022-02-27T00:57:35.73149 auth.err: Feb 27 01:57:35 elogind[1697]: elogind is already running as PID 1236
2022-02-27T00:57:36.73632 auth.err: Feb 27 01:57:36 elogind[1704]: elogind is already running as PID 1236
2022-02-27T00:57:37.74101 auth.err: Feb 27 01:57:37 elogind[1713]: elogind is already running as PID 1236
2022-02-27T00:57:38.74557 auth.err: Feb 27 01:57:38 elogind[1720]: elogind is already running as PID 1236
2022-02-27T00:57:39.74996 auth.err: Feb 27 01:57:39 elogind[1727]: elogind is already running as PID 1236
2022-02-27T00:57:40.75455 auth.err: Feb 27 01:57:40 elogind[1735]: elogind is already running as PID 1236
2022-02-27T00:57:41.75909 auth.err: Feb 27 01:57:41 elogind[1742]: elogind is already running as PID 1236
2022-02-27T00:57:42.76429 auth.err: Feb 27 01:57:42 elogind[1749]: elogind is already running as PID 1236
2022-02-27T00:57:43.41557 authpriv.notice: Feb 27 01:57:43 greetd: pam_unix(greetd:auth): check pass; user unknown
2022-02-27T00:57:43.41559 authpriv.notice: Feb 27 01:57:43 greetd: pam_unix(greetd:auth): authentication failure; logname= uid=0 euid=0 tty= ruser= rhost=
The elogind service was unable to start as well. Without greetd, there are no problems with elogind.
Of course i have disabled the agetty-tty1 service when running greetd on VT1 as stated in the included readme.
Checked /etc/pam.d/ and the greetd file exists.
The user _greeter also exists and is in the video group.
The /etc/greetd/config.toml file is the default.
I normally have the following services running (without greetd here, because it didn't work):
run: /var/service/NetworkManager: (pid 1191) 764s
run: /var/service/agetty-tty1: (pid 1202) 764s
run: /var/service/agetty-tty2: (pid 1213) 764s
run: /var/service/bluetoothd: (pid 1218) 764s; run: log: (pid 1216) 764s
run: /var/service/dbus: (pid 1209) 764s
run: /var/service/elogind: (pid 1194) 764s
run: /var/service/fcron: (pid 1189) 764s
run: /var/service/isc-ntpd: (pid 1200) 764s
run: /var/service/libvirtd: (pid 1217) 764s; run: log: (pid 1214) 764s
run: /var/service/nanoklogd: (pid 1327) 763s
run: /var/service/polkitd: (pid 1211) 764s
run: /var/service/socklog-unix: (pid 1212) 764s; run: log: (pid 1210) 764s
run: /var/service/udevd: (pid 1205) 764s
run: /var/service/uuidd: (pid 1199) 764s
run: /var/service/virtlockd: (pid 1206) 764s; run: log: (pid 1203) 764s
run: /var/service/virtlogd: (pid 1204) 764s; run: log: (pid 1201) 764s
Steps to reproduce the behavior
Enable the greetd service and try to login.
I think this is the same problem as https://github.com/elogind/elogind/issues/195.
Probably not the same as #195 (I may comment there as well). Void's greetd installation is slightly broken, in that no default shell is assigned to the _greeter user, or $SHELL="/sbin/nologin". Arch at least assigns "/bin/bash" as shell for the greeter user. Greetd references the "$SHELL" variable in /etc/greetd/config.toml. Users often replace $SHELL with something else, accidentally eliminating the bug.
The easiest solution is to:
sudo chsh -s /bin/bash _greeter
or you may edit /etc/greetd/config.toml as root, changing $SHELL to /bin/bash or whatever you prefer. Alternatively, you may also create a default SHELL="/bin/bash" in /etc/environment.
- Regarding the
eloginderrors, how are you startingelogind? If you have thedbusservice enabled, you usually don't need theelogindservice enabled except under very specific circumstances. - Can you try the changes in #36552 and see if they fix the problem?
The easiest solution is to:
sudo chsh -s /bin/bash _greeter
This seemed to work. I can now login using agreety, which gets me into a bash shell.
- Regarding the elogind errors, how are you starting elogind? If you have the dbus service enabled, you usually don't need the elogind service enabled except under very specific circumstances.
I started the service. But seeing how changing the shell resolved the described issue i don't think it has anything do with it
This seemed to work. I can now login using agreety, which gets me into a bash shell.
Okay, but I'd still like you to test the changes in the PR. I can't reproduce your error, and it would be helpful for other people who run into it if this fixed it.
I started the service. But seeing how changing the shell resolved the described issue i don't think it has anything do with it
I doesn't, I was just giving you a tip to reduce the amount of errors in general.
@cinerea0, after reverting my "solution", your PR change worked fine on my system.