fairyglade / ly

display manager with console UI
Do What The F*ck You Want To Public License
5.47k stars 305 forks source link

[Bug] Cannot log in when shell set to fish #690

Closed goop32 closed 2 months ago

goop32 commented 3 months ago

Pre-requisites

Ly version

1.0.2

Observed behavior

When my shell is set to /sbin/fish in /etc/passwd, ly will not let me log in. I get an error that says my credentials are invalid. I logged into the root user and reset my password but I was still given the same error.

Expected behavior

I expected ly to let me log in normally.

Steps to reproduce

1) Install fish, get path of fish, set login shell to path in /etc/passwd 2) Exit window manager 3) Type in user's credentials 4) ly gives incorrect credentials error

Relevant logs

...
-- Boot 49127e1d5dc84ff8ba6a5bb3cd758596 --
Aug 17 15:47:22 gooputer systemd[1]: Started TUI display manager.
Aug 17 15:54:03 gooputer ly-dm[763]: pam_systemd_home(ly:auth): New sd-bus connection (system-bus-pam-systemd-home-763) opened.
Aug 17 15:54:03 gooputer ly-dm[763]: pam_unix(ly:session): session opened for user sab(uid=1000) by sab(uid=0)
Aug 17 15:54:03 gooputer ly-dm[763]: pam_systemd(ly:session): New sd-bus connection (system-bus-pam-systemd-763) opened.
Aug 17 16:35:57 gooputer ly-dm[10828]: pam_shells(ly:auth): User has an invalid shell '/sbin/fish'
Aug 17 16:35:57 gooputer ly-dm[10828]: pam_systemd_home(ly:auth): New sd-bus connection (system-bus-pam-systemd-home-10828) opened.
Aug 17 16:36:09 gooputer ly-dm[10847]: pam_shells(ly:auth): User has an invalid shell '/sbin/fish'
Aug 17 16:36:09 gooputer ly-dm[10847]: pam_systemd_home(ly:auth): New sd-bus connection (system-bus-pam-systemd-home-10847) opened.
Aug 17 16:36:23 gooputer ly-dm[10853]: pam_unix(ly:session): session opened for user root(uid=0) by root(uid=0)
Aug 17 16:36:23 gooputer ly-dm[10853]: pam_systemd(ly:session): New sd-bus connection (system-bus-pam-systemd-10853) opened.
Aug 17 16:36:42 gooputer ly-dm[10960]: pam_unix(ly:session): session opened for user root(uid=0) by root(uid=0)
Aug 17 16:36:42 gooputer ly-dm[10960]: pam_systemd(ly:session): New sd-bus connection (system-bus-pam-systemd-10960) opened.
Aug 17 16:37:01 gooputer ly-dm[10983]: pam_systemd_home(ly:auth): New sd-bus connection (system-bus-pam-systemd-home-10983) opened.
Aug 17 16:37:01 gooputer ly-dm[10983]: pam_unix(ly:session): session opened for user sab(uid=1000) by sab(uid=0)
Aug 17 16:37:01 gooputer ly-dm[10983]: pam_systemd(ly:session): New sd-bus connection (system-bus-pam-systemd-10983) opened.
goop32 commented 3 months ago

Edited to add systemd service log. When computer was first booted, the shell was set to /usr/bin/bash, and I was able to log in. After setting the shell to /sbin/fish (it is there, I swear), I get the User has an invalid shell '/sbin/fish' error.

AnErrupTion commented 2 months ago

@goop32 The problem lies in that /sbin/fish is not a registered shell in /etc/shells. When running chsh -s /sbin/fish as your user, you see something like this:

chsh: "/sbin/fish" is not listed in /etc/shells.
Use chsh -l to see list.

And indeed, when reading that text file, /sbin/fish is not present. This means it isn't an Ly issue, so I'll be closing it.

goop32 commented 2 months ago

Oh, I see. I'll be honest, I didn't know chsh was a thing, I would just edit my shell from /etc/passwd. Thanks for teaching me something today!