Bug 17890

Summary: "Passwort bei der nächsten Anmeldung ändern" Code auf aktuelles Samba anpassen
Product: UCS Reporter: Arvid Requate <requate>
Component: UMC - UsersAssignee: Dirk Wiesenthal <wiesenthal>
Status: CLOSED FIXED QA Contact: Stefan Gohmann <gohmann>
Severity: normal    
Priority: P5 CC: gohmann, klaeser
Version: UCS 2.3Keywords: interim-2
Target Milestone: UCS 3.2   
Hardware: Other   
OS: Linux   
What kind of report is it?: --- What type of bug is this?: ---
Who will be affected by this bug?: --- How will those affected feel about the bug?: ---
User Pain: Enterprise Customer affected?:
School Customer affected?: ISV affected?:
Waiting Support: Flags outvoted (downgraded) after PO Review:
Ticket number: Bug group (optional):
Max CVSS v3 score:

Description Arvid Requate univentionstaff 2010-03-16 11:52:38 CET
Da sambaPwdMustChange deprecated ist (Bug 13199, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=519666), fragt man sich irgendwann, wie dann "must change at next logon" funktioniert. Momentan funktioniert das, weil in smb.conf "obey pam restrictions = yes" steht und PAM den Account aufgrund folgender Zeile als gesperrt meldet:

account [success=done new_authtok_reqd=done acct_expired=bad default=ignore]    pam_unix.so

(in /etc/pam.d/samba bzw. common-account, interessanterweise durch "new_authtok_reqd=done". Nimmt man die Zeile heraus, funktioniert der Login mit altem Passwort weiterhin, allerdings mit kurzer Verzögerung z.B. bei "smbclient -L localhost" nach Auflisten der Shares..)

Schaltet man die Samba Option "obey pam restrictions" per UCR:samba/pam/restrictions=no ab, dann wird die UDM Einstellung "Passwort bei der nächsten Anmeldung ändern" nicht umgesetzt (und "smbclient -L localhost" zeigt keine Verzögerung).

samba-3.3.10 hingegen wertet 'sambaPwdLastSet=0' als "must change at next logon" (samba-3.3.10/source/auth/auth_sam.c). Das sollte in users/user umgesetzt werden. Der Vorteil wäre, dass es unabhängig von Password Expiry Policy und PAM funktioniert.
Comment 1 Dirk Wiesenthal univentionstaff 2013-09-16 14:22:07 CEST
In users/user.py:
- sambaPwdLastSetValue='1'
+ sambaPwdLastSetValue='0'

Scheint zu funktionieren in
  univention-directory-manager-modules 9.0.35-1.1082.201309161419
Comment 2 Stefan Gohmann univentionstaff 2013-09-19 21:37:39 CEST
S4 / AD Connector still OK. They both use the value but they check for 0 or 1.

UDM works as well.

Changelog: OK
Comment 3 Stefan Gohmann univentionstaff 2013-11-19 06:42:28 CET
UCS 3.2 has been released:
 http://docs.univention.de/release-notes-3.2-en.html
 http://docs.univention.de/release-notes-3.2-de.html

If this error occurs again, please use "Clone This Bug".