Linuxmuster-linuxclient7: Nach Update kein Login möglich

Hallo zusammen,

ich will unser Image aktualisieren, d.h. ich habe den Befehl apt dist-upgrade ausgeführt und anschließend linuxmuster-linuxclient7 prepare-image.
nach verteilen des Image ist keine Anmeldung mehr möglich, weder als AD-Nutzer noch als lokaler Nutzer linuxadmin.
Das letzte Update wurde im Juli diesen Jahres gemacht.
Um das Problem einzugrenzen habe ich nur das Paket linuxmuster-linuxclient7 mit dem Befehl apt install linuxmuster-linuxclient7, dabei ändert sich die Version von 1.0.2 auf 1.0.4.
Nach Ausloggen ist kein Anmelden mehr möglich, weder vor- noch nach dem Image erstellen (zwei getrennte Versuche).
Hat jemand eine Idee?

Grüße
Sven

Hallo Sven,

Es könnte viele Ursache haben, ich gebe mal ein paar Tests per ssh zu führen ( die Liste ist nicht komplett ) :

Was ist der status von linuxmuster-linuxclient7 ?

linuxmuster-linuxclient7 status

Ist die Uhrzeit aktuell ?

date # vergleichen mit dem Server

Kann man ein Kerberos Ticket holen ?

kinit USER

Wenn dies nicht geht, probieren mit Verbose Modus :

KRB5_TRACE=/dev/stdout kinit USER

Gibt es eine Fehlermeldung in /var/log/syslog ?

Läuft den Service sssd ?

systemctl status sssd

( es zeigt bei mir einige Fehlermeldungen, funktioniert trotzdem, nicht erschrecken ).

Geht es besser wenn man die Datei /etc/krb5.keytab auf dem Client löscht ?

Nur so ein paar Ideen um das Problem einzugrenzen.

Gruß

Arnaud

Hallo Arnaud,

danke für die Liste, ich werde sie morgen abarbeiten. Richtet das Paket linuxmuster-linuxclient7 ssh ein - falls ja für welchen Nutzer?
Oder muss man das selbst machen, falls ja - wie?

Viele Grüße
Sven

Hallo Sven,

Glaube ich nicht, aber ich installiere es immer selber.
Der Fakt, dass du dich als lokaler linuxadmin nicht anmelden kannst ist schon problematisch und unabhängig von linuxmuster-linuxclient7 ( nach meiner Meinung ). Es könnte auch sein, dass die Festplatte voll ist ( oder die Tastatur ein falsches Layout hat ? ).

Gruß

Arnaud

Hallo Arnaud,

das habe ich mir auch gedacht und deshalb habe ich nur das Paket linuxmuster-linuxclient7 upgedatet, abgemeldet und dann ist kein Login mehr möglich. Ich schaue mir an, ob dieses Update das Tastaturlayout ändert, kann es mir aber nicht vorstellen. Speicher ist genug frei.

Viele Grüße
Sven

Hi Sven,

Schau doch mal bitte in den Syslog, ob es da Fehlermeldungen gibt. Der Linuxclient sollte niemals in den Logon vom Linuxadmin eingreifen.
Was für ein Distro hast du?

VG, Dorian

Hallo,

ich habe die Ursache gefunden!

Das Update des linuxmuster-linxclient7 löscht die Datei /etc/security/pam_mount.conf.xml

Hier die Schritte zum Nachstellen:

ich habe versucht, mich nach dem Update über die tty2 anzumelden, was nicht funktioniert hat, aber es wurde folgende Meldung ausgegeben:

I/O warning : failed to load external entity „/etc/security/pam_mount.conf.xml“
(rdconf1.c:401): libxml detected a syntax error in /etc/security/pam_mount.conf.xml

Die Datei /etc/security/pam_mount.conf.xml gibt es auch nicht.
Also habe ich neu gesynct (also den Zustand vor dem Update wiederhergestellt).
Hier gibt es noch die Datei /etc/security/pam_mount.conf.xml mit folgendem Inhalt

<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE pam_mount SYSTEM "pam_mount.conf.xml.dtd">
<pam_mount>
    <debug enable="1" />
    <volume user="*" fstype="cifs" server="server.linuxmuster.lan" path="sysvol" mountpoint="/srv/samba/%(USER)/sysvol" options="sec=ntlmssp,nodev,nosuid,mfsymlinks,nobrl,vers=3.0" />
    <mntoptions allow="nosuid,nodev,loop,encryption,fsck,nonempty,allow_root,allow_other" />
    <mntoptions require="nosuid,nodev" />
    <logout wait="1000" hup="0" term="1" kill="1" />
    <mkmountpoint enable="1" remove="true" />
</pam_mount>

Ich habe sie gesichert:

cp /etc/security/pam_mount.conf.xml /etc/security/pam_mount.conf.xml.backup

Anschließend das Update mit:

sudo apt install linuxmuster-linuxclient7

apt install linuxmuster-linuxclient7 
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut.       
Statusinformationen werden eingelesen.... Fertig
Die folgenden Pakete wurden automatisch installiert und werden nicht mehr benötigt:
  libpam-mount libpam-mount-bin
Verwenden Sie »apt autoremove«, um sie zu entfernen.
Die folgenden Pakete werden aktualisiert (Upgrade):
  linuxmuster-linuxclient7
1 aktualisiert, 0 neu installiert, 0 zu entfernen und 187 nicht aktualisiert.
Es müssen 29,5 kB an Archiven heruntergeladen werden.
Nach dieser Operation werden 16,4 kB Plattenplatz zusätzlich benutzt.
Holen:1 https://archive.linuxmuster.net focal/ linuxmuster-linuxclient7 1.0.4 [29,5 kB]
Es wurden 29,5 kB in 0 s geholt (147 kB/s).   
(Lese Datenbank ... 433791 Dateien und Verzeichnisse sind derzeit installiert.)
Vorbereitung zum Entpacken von .../linuxmuster-linuxclient7_1.0.4_all.deb ...
Entpacken von linuxmuster-linuxclient7 (1.0.4) über (1.0.2) ...
linuxmuster-linuxclient7 (1.0.4) wird eingerichtet ...
Neue Version der Konfigurationsdatei /etc/linuxmuster-linuxclient7/onBoot.d/00_e
xample.sh wird installiert ...
Neue Version der Konfigurationsdatei /etc/linuxmuster-linuxclient7/onLogin.d/00_
example.sh wird installiert ...
Neue Version der Konfigurationsdatei /etc/linuxmuster-linuxclient7/onLoginAsRoot
.d/00_example.sh wird installiert ...
Neue Version der Konfigurationsdatei /etc/linuxmuster-linuxclient7/onLogoutAsRoo
t.d/00_example.sh wird installiert ...
Neue Version der Konfigurationsdatei /etc/linuxmuster-linuxclient7/onSessionStar
ted.d/00_example.sh wird installiert ...
Neue Version der Konfigurationsdatei /etc/linuxmuster-linuxclient7/onShutdown.d/
00_example.sh wird installiert ...
[INFO] #### linuxmuster-linuxclient7 upgrade ####
[INFO] Upgrading network config.
[INFO] No need to upgrade, already up-to-date.
[INFO] Deleting obsolete files
[INFO] * /etc/profile.d/99-linuxmuster.sh
[INFO] * /etc/sudoers.d/linuxmuster
[INFO] * /etc/profile.d/linuxmuster-proxy.sh/etc/bash_completion.d/99-linuxmuste
r-client-adsso.sh
[INFO] * /etc/profile.d/99-linuxmuster-client-adsso.sh
[INFO] * /etc/sudoers.d/linuxmuster-client-adsso
[INFO] * /usr/sbin/linuxmuster-client-adsso
[INFO] * /usr/sbin/linuxmuster-client-adsso-print-logs
[INFO] * /etc/systemd/system/linuxmuster-client-adsso.service
[INFO] * /home/linuxadmin/.config/autostart/linuxmuster-client-adsso-autostart.d
esktop
[INFO] * /etc/cups/client.conf
[INFO] * /usr/share/linuxmuster-linuxclient7/templates/linuxmuster-client-adsso.
service
[INFO] * /usr/share/linuxmuster-linuxclient7/templates/linuxmuster-client-adsso-
autostart.desktop
[INFO] * /etc/security/pam_mount.conf.xml
[INFO] * /usr/share/linuxmuster-linuxclient7/templates/pam_mount.conf.xml
[INFO] Deleting obsolete directories
[INFO] * /etc/linuxmuster-client
[INFO] * /etc/linuxmuster-client-adsso
[INFO] * /usr/share/linuxmuster-client-adsso
[INFO] Applying all configuration templates:
[INFO] * cifs.spnego.conf ...
[DEBUG] -> to /etc/request-key.d/cifs.spnego.conf
[INFO] * linuxmuster-linuxclient7.service ...
[DEBUG] -> to /etc/systemd/system/linuxmuster-linuxclient7.service
[INFO] * linuxmuster-linuxclient7.desktop ...
[DEBUG] -> to /home/linuxadmin/.config/autostart/linuxmuster-linuxclient7-autost
art.desktop
[INFO] * nsswitch.conf ...
[DEBUG] -> to /etc/nsswitch.conf
[INFO] * common-session ...
[DEBUG] -> to /etc/pam.d/common-session
[INFO] * lightdm.conf ...
[DEBUG] -> to /etc/lightdm/lightdm.conf.d/50-linuxmuster.conf
[INFO] * greeter.dconf-defaults ...
[DEBUG] -> to /etc/gdm3/greeter.dconf-defaults
[INFO] * timesyncd.conf ...
[DEBUG] -> to /etc/systemd/timesyncd.conf
[INFO] * krb5.conf ...
[DEBUG] -> to /etc/krb5.conf
[INFO] * smb.conf ...
[DEBUG] -> to /etc/samba/smb.conf
[INFO] Reloading systemctl ... 
[INFO] Raloading systctl daemon
[INFO] Enabling services:
[INFO] * linuxmuster-linuxclient7
[INFO] * smbd
[INFO] * nmbd
[INFO] * sssd
[INFO] Restarting services:
[INFO] * smbd
[INFO] * nmbd
[INFO] * systemd-timesyncd
[INFO] Adjusting sssd.conf
[INFO] Writing new Configuration
[INFO] Restarting sssd
[INFO] #### linuxmuster-linuxclient7 upgrade SUCCESSFULL ####

Nun gibt es die Datei /etc/security/pam_mount.conf.xml nicht mehr, es ist kein Login mehr möglich.
Kopiere ich meine Backup zurück
cp /etc/security/pam_mount.conf.xml.backup /etc/security/pam_mount.conf.xml
funktioniert die Anmeldung wieder.
Das Update des linuxmuster-linxclient7 löscht also die Datei /etc/security/pam_mount.conf.xml.

Der Vollständigkeit halber: Meine Distro ist Linux Mint 20.2 Uma

Viele Grüße
Sven

Hi Sven,

Ja, das stimmt und das ist auch Absicht. Denn in der neusten Version wird die pam_mount.xml eigentlich nicht mehr gebraucht. Früher wurde sie verwendet, um bei der Anmeldung das sysvol zu mounten, aber das geht inzwischen anders.
Kannst du bitte mal den Inhalt von /etc/pam.d/common-session posten?

VG, Dorian

Hallo Dorian, hallo Swen,

vielleicht nicht ganz das Problem, hängt aber möglicherweise zusammen.

Ich habe folgendes gemacht:

Auf einen gesyncten Client die aktuellen Updates eingespielt, Image erstellt und hochgeladen.
Einen zweiten Client mit dem „Sync“-Button gesynct. Linuxadmin konnte sich einloggen ansonsten niemand.
Dann habe ich den gleichen Client mit „neu und start“ gesynct. Jetzt können sich auch andere (also „bo“ und „ba“) einloggen.

Gruß

Alois

Hallo Dorian,

vor dem Update (also linuxmuster-linuxclient 1.0.2)

#
# WARNING! All changes to this file will be overwritten by linuxmuster-linuxclient7 setup and upgrade!
#
# /etc/pam.d/common-session - session-related modules common to all services
#
# This file is included from other service-specific PAM config files,
# and should contain a list of modules that define tasks to be performed
# at the start and end of sessions of *any* kind (both interactive and
# non-interactive).
#
# As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
# To take advantage of this, it is recommended that you configure any
# local modules either before or after the default block, and use
# pam-auth-update to manage selection of other modules.  See
# pam-auth-update(8) for details.

# here are the per-package modules (the "Primary" block)
session [default=1]                     pam_permit.so
# here's the fallback if no module succeeds
session requisite   pam_deny.so

## linuxmuster-linuxclient7: mount the homedir first using requisite
session requisite   pam_mkhomedir.so  skel=/home/linuxadmin
## linuxmuster-linuxclient7: exec more scripts as root using requisite
session requisite   pam_exec.so /usr/share/linuxmuster-linuxclient7/scripts/onLoginLogoutAsRoot

# prime the stack with a positive return value if there isn't one already;
# this avoids us returning an error just because nothing sets a success code
# since the modules above will each just jump around
session required        pam_permit.so
# The pam_umask module will set the umask according to the system default in
# /etc/login.defs and user settings, solving the problem of different
# umask settings with different shells, display managers, remote sessions etc.
# See "man pam_umask".
session optional        pam_umask.so
# and here are more per-package modules (the "Additional" block)
session required        pam_unix.so
session optional                        pam_sss.so
session optional        pam_mount.so
session optional        pam_systemd.so
session optional        pam_ecryptfs.so unwrap
# end of pam-auth-update config

nach dem Update, also linuxmuster-linuxclient7 1.0.6

#
# WARNING! All changes to this file will be overwritten by linuxmuster-linuxclient7 setup and upgrade!
#
# /etc/pam.d/common-session - session-related modules common to all services
#
# This file is included from other service-specific PAM config files,
# and should contain a list of modules that define tasks to be performed
# at the start and end of sessions of *any* kind (both interactive and
# non-interactive).
#
# As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
# To take advantage of this, it is recommended that you configure any
# local modules either before or after the default block, and use
# pam-auth-update to manage selection of other modules.  See
# pam-auth-update(8) for details.

# here are the per-package modules (the "Primary" block)
session [default=1]     pam_permit.so
# here's the fallback if no module succeeds
session requisite   pam_deny.so

## linuxmuster-linuxclient7: mount the homedir first using requisite
session requisite   pam_mkhomedir.so  skel=/home/linuxadmin
## linuxmuster-linuxclient7: exec more scripts as root using requisite
session requisite   pam_exec.so /usr/share/linuxmuster-linuxclient7/scripts/onLoginLogoutAsRoot

# prime the stack with a positive return value if there isn't one already;
# this avoids us returning an error just because nothing sets a success code
# since the modules above will each just jump around
session required        pam_permit.so
# The pam_umask module will set the umask according to the system default in
# /etc/login.defs and user settings, solving the problem of different
# umask settings with different shells, display managers, remote sessions etc.
# See "man pam_umask".
session optional        pam_umask.so
# and here are more per-package modules (the "Additional" block)
session required        pam_unix.so
session optional        pam_sss.so
session optional        pam_systemd.so
# end of pam-auth-update config

Hilft das weiter?
Kannst du abschätzen, ob ich meinen Workaround (das Zurückkopieren der Datei pam_mount.conf.xml als Übergang nutzbar ist oder führt das dann später zu Problemen?

Viele Grüße
Sven

Hi,

Hilft leider nicht wiklich …
Das wichtige ist, dass pam_mount.so verschwindet. Sehr merkwürdig, dass das passiert.
Die pam_mount.xml kannst du zurückkopieren, sie wird nur bei jedem Update wieder weggelöscht. Schau mal bitte, ob in /etc/pam.d in einer anderen Datei noch pam_mount.so steht.

VG, Dorian

Hallo Dorian,

Ein grep -i -r "pam_mount.so" /etc/pam.d/ ergibt vor dem Update des pakets linuxmuster-linuxclient7

/etc/pam.d/common-password.pam-old:password	optional	pam_mount.so disable_interactive
/etc/pam.d/common-pammount:auth		required pam_mount.so
/etc/pam.d/common-pammount:session		optional pam_mount.so
/etc/pam.d/common-auth.pam-old:auth	optional	pam_mount.so 
/etc/pam.d/common-session:session	optional	pam_mount.so 
/etc/pam.d/common-password:password	optional	pam_mount.so disable_interactive
/etc/pam.d/common-session.pam-old:session	optional	pam_mount.so 
/etc/pam.d/common-auth:auth	optional	pam_mount.so

Nach dem Update des Pakets `` apt install linuxmuster-linuxclient7 `

|/etc/pam.d/common-password.pam-old:password|optional|pam_mount.so disable_interactive|
|---|---|---|
|/etc/pam.d/common-pammount:auth||required pam_mount.so|
|/etc/pam.d/common-pammount:session||optional pam_mount.so|
|/etc/pam.d/common-auth.pam-old:auth|optional|pam_mount.so |
|/etc/pam.d/common-password:password|optional|pam_mount.so disable_interactive|
|/etc/pam.d/common-session.pam-old:session|optional|pam_mount.so |
|/etc/pam.d/common-auth:auth|optional|pam_mount.so |

Und nach Ausführen apt dist-upgrade

|/etc/pam.d/common-password.pam-old:password|optional|pam_mount.so disable_interactive|
|---|---|---|
|/etc/pam.d/common-pammount:auth||required pam_mount.so|
|/etc/pam.d/common-pammount:session||optional pam_mount.so|
|/etc/pam.d/common-auth.pam-old:auth|optional|pam_mount.so |
|/etc/pam.d/common-password:password|optional|pam_mount.so disable_interactive|
|/etc/pam.d/common-session.pam-old:session|optional|pam_mount.so |
|/etc/pam.d/common-auth:auth|optional|pam_mount.so |

Dabei wird gefragt:

Eine oder mehrere der Dateien │
│ /etc/pam.d/common-{auth,account,password,session} sind lokal verändert │
│ worden. Bitte geben Sie an, ob diese Änderungen durch die mitgelieferte │
│ Konfiguration außer Kraft gesetzt werden sollen. Falls Sie diese Option │
│ ablehnen, müssen Sie die Authentifizierungs-Konfiguration Ihres Systems │
│ von Hand verwalten. │
│ │
│ Lokale Änderungen an /etc/pam.d/common-* außer Kraft setzen?

Ich habe mit „nein“ geantwortet.

Hier noch die Log-Datei vom Update

log.apt.dist-upgrade.odt (35,5 KB)

Insbesondere fällt mir darin auf

sssd-common (2.2.3-3ubuntu0.7) wird eingerichtet ...
Warning: found usr.sbin.sssd in /etc/apparmor.d/force-complain, forcing complain
 mode
Warnung aus /etc/apparmor.d/usr.sbin.sssd (/etc/apparmor.d/usr.sbin.sssd Zeile 5
9): Warning failed to create cache: usr.sbin.sssd
sssd-autofs.service is a disabled or a static unit not running, not starting it.
sssd-nss.service is a disabled or a static unit not running, not starting it.
sssd-pam.service is a disabled or a static unit not running, not starting it.
sssd-ssh.service is a disabled or a static unit not running, not starting it.
sssd-sudo.service is a disabled or a static unit not running, not starting it.
Job failed. See "journalctl -xe" for details.
A dependency job for sssd-pam.socket failed. See 'journalctl -xe' for details.
Job failed. See "journalctl -xe" for details.

Viele Grüße
Sven

Hi Sven,

Probier mal bitte, ob sich das Problem löst, wenn du die Zeile mit pam_mount.so überall rauswirfst.

VG, Dorian

1 „Gefällt mir“

Hallo Dorian,

Das löst das Problem.

Vielen Dank für deine Mühen
Sven

2 „Gefällt mir“