Bug 32152 - Traceback on forced password change for user without Kerberos principal
Traceback on forced password change for user without Kerberos principal
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: PAM
UCS 4.2
Other Linux
: P5 normal (vote)
: UCS 3.x
Assigned To: UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-04 10:09 CEST by Philipp Hahn
Modified: 2020-07-03 20:51 CEST (History)
2 users (show)

See Also:
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:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipp Hahn univentionstaff 2013-08-04 10:09:58 CEST
I created a new user using a template, where the Kerberos option was not enabled, so the user was created without any Kerberos information.
On first login the user is forced to change its expired password, which fails with the following error message:

$ ssh hahn@192.168.178.20 # univention Valla123
Password: 
You are required to change your password immediately (password aged)
Current Kerberos password: 
Password: 
Retype new password: 
: External password quality program failed: Traceback (most recent call last):

The error is caused by /usr/share/univention-heimdal/check_cracklib.py, which is configured an the "external_program" for [password_quality] in /etc/heimdal-kdc/kdc.conf.

Adding some debug information shows, that the LDAP search for user fails, because the user object is not found by searching for the not existent Kerberos principal name:

Traceback (most recent call last):
  File "/usr/share/univention-heimdal/check_cracklib.py", line 65, in <module>
    pwdCheck = univention.password.Check(None, params['principal'])
  File "/usr/lib/pymodules/python2.6/univention/password.py", line 51, in __init__
    self._userPolicy(username)
  File "/usr/lib/pymodules/python2.6/univention/password.py", line 89, in _userPolicy
    dn = self.lo.searchDn('krb5PrincipalName=%s' % username)[0]
IndexError: list index out of range


1. Notice that for a non-Kerberos-user the pam_krb5 module is still used and asks for the password a second time.
2. Errors should be logged somewhere.
3. PAM authentication should co-op with accounts, which don't user Kerberos, or should disallow that.
Comment 1 Florian Best univentionstaff 2017-05-11 17:46:34 CEST
Same happened on Bug #44582 and Bug #44584.
Comment 2 Ingo Steuwer univentionstaff 2020-07-03 20:51:30 CEST
This issue has been filed against UCS 4.2.

UCS 4.2 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.