FS#77404 - could not login after update (zsh removed out of /etc/shells)

Attached to Project: Arch Linux
Opened by kmille (kmille) - Monday, 06 February 2023, 09:36 GMT
Last edited by Toolybird (Toolybird) - Tuesday, 07 February 2023, 03:12 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Hey,

yesterday's update to bash 5.1.016-3 broke my system. After the update/reboot, I couldn't login anymore. The autologin didn't work. lightdm appeared and even if I entered the right password, login failed. I'm using zsh as login shell and it was not listed in /etc/shells after the update.

/etc/shells before the update

kmille@linbox:etc cat shells
# Pathnames of valid login shells.
# See shells(5) for details.

/bin/sh
/bin/bash
/usr/bin/git-shell
/bin/zsh
/usr/bin/zsh

/etc/shells after the update
kmille@linbox:scripts cat /etc/shells
# Pathnames of valid login shells.
# See shells(5) for details.

/bin/sh
/bin/bash
/bin/rbash


kmille@linbox:etc cat /etc/passwd| grep kmille
kmille:x:1000:1000::/home/kmille:/usr/bin/zsh

The "error" message was not really clear

kmille@linbox:etc journalctl -b -2 -u lightdm
Feb 05 22:43:59 linbox systemd[1]: Starting Light Display Manager...
Feb 05 22:43:59 linbox systemd[1]: Started Light Display Manager.
Feb 05 22:44:01 linbox lightdm[1115]: pam_succeed_if(lightdm-autologin:auth): requirement "user ingroup autologin" was met by user "kmille"
Feb 05 22:44:01 linbox lightdm[1115]: gkr-pam: no password is available for user
Feb 05 22:44:04 linbox lightdm[1130]: pam_unix(lightdm-greeter:session): session opened for user lightdm(uid=975) by (uid=0)
Feb 05 22:44:04 linbox lightdm[1179]: pam_systemd_home(lightdm:auth): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
Feb 05 22:44:17 linbox lightdm[1179]: gkr-pam: unable to locate daemon control file
Feb 05 22:44:17 linbox lightdm[1179]: gkr-pam: stashed password to try later in open session
Feb 05 22:44:19 linbox lightdm[1188]: pam_systemd_home(lightdm:auth): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
Feb 05 22:44:23 linbox lightdm[1188]: gkr-pam: unable to locate daemon control file
Feb 05 22:44:23 linbox lightdm[1188]: gkr-pam: stashed password to try later in open session
Feb 05 22:44:25 linbox lightdm[1191]: pam_systemd_home(lightdm:auth): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
Feb 05 22:46:06 linbox lightdm[1191]: gkr-pam: unable to locate daemon control file
Feb 05 22:46:06 linbox lightdm[1191]: gkr-pam: stashed password to try later in open session
Feb 05 22:46:08 linbox lightdm[1445]: pam_systemd_home(lightdm:auth): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
Feb 05 22:46:52 linbox systemd[1]: Stopping Light Display Manager...
Feb 05 22:46:53 linbox lightdm[1072]: Failed to get D-Bus connection
Feb 05 22:46:53 linbox systemd[1]: lightdm.service: Main process exited, code=exited, status=1/FAILURE
Feb 05 22:46:53 linbox systemd[1]: lightdm.service: Failed with result 'exit-code'.
Feb 05 22:46:53 linbox systemd[1]: Stopped Light Display Manager.
Feb 05 22:46:53 linbox systemd[1]: lightdm.service: Consumed 3.780s CPU time.

Problem causing commit?
https://github.com/archlinux/svntogit-packages/commit/7738aa2694533b52b8581ea60a810f27f8a863a8

Can you tell me what went wrong on my system?

Thanks!
This task depends upon

Closed by  Toolybird (Toolybird)
Tuesday, 07 February 2023, 03:12 GMT
Reason for closing:  Not a bug
Additional comments about closing:  See comments
Comment by John (graysky) - Monday, 06 February 2023, 10:56 GMT
You need to diff /etc/shells against /etc/shells.pacnew to merge them not simply overwrite them.

https://wiki.archlinux.org/title/Pacman/Pacnew_and_Pacsave#Managing_.pac*_files
Comment by kmille (kmille) - Monday, 06 February 2023, 11:06 GMT
Ah, I also run checkservices and that overwrote my /etc/shells. Then it was just a race... The bash package update wrote to /etc/shells, but doesn't backup /etc/shells. The .pacnew file must be from another package ...

backup=(etc/bash.bash{rc,_logout} etc/skel/.bash{rc,_profile,_logout})
Comment by regid (regid1) - Monday, 06 February 2023, 12:00 GMT
1. After reading 1st, oldest, comment, by John (graysky), it makes sense to merge, rather than overwrite. What is confusing here, though, is that I never edited /etc/shells manually to begin with. Should https://wiki.archlinux.org/title/Pacman/Pacnew_and_Pacsave#Managing_.pac*_files emphasize this point?
2. /etc/shells is owned by filesystem 2023.01.31-1
Comment by John (graysky) - Monday, 06 February 2023, 12:27 GMT
Installation of packages will make the changes to that file as they need to, for example see: https://github.com/archlinux/svntogit-packages/blob/packages/zsh/trunk/zsh.install

Point is never just blindly overwrite a live file with a pacnew. Always diff/merge manually.
Comment by regid (regid1) - Monday, 06 February 2023, 13:03 GMT

Loading...