Bug 31868 - The mail option requires a password
The mail option requires a password
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - Users
UCS 3.1
Other Linux
: P5 normal (vote)
: UCS 3.1-1-errata
Assigned To: Lukas Walter
Alexander Kläser
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-02 09:26 CEST by Stefan Gohmann
Modified: 2013-07-10 14:18 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:
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 Stefan Gohmann univentionstaff 2013-07-02 09:26:04 CEST
Currently a password is required when the mail option is set. The password should only be required if one of the following options is set:
 - posix
 - samba
 - kerberos
 - ldap_pwd
Comment 1 Stefan Gohmann univentionstaff 2013-07-02 09:26:54 CEST
Please also add a test case for this issue.
Comment 2 Lukas Walter univentionstaff 2013-07-02 13:26:50 CEST
The mail option is not connected to any password related properties anymore.

When creating/modifying a user, it is no more possible to set a password or values connected to the password.


Build package for ucs-3.2-0 and errata-3-1-1.
Added changelog entry for ucs3.2-0.
Added errata YAML.
Comment 3 Lukas Walter univentionstaff 2013-07-02 13:41:46 CEST
The following traceback has been fixed as well:

File "/usr/lib/pymodules/python2.6/notifier/threads.py", line 82, in _run
    tmp = self._function()
  File "/usr/lib/pymodules/python2.6/notifier/__init__.py", line 104, in __call__
    return self._function( *tmp, **self._kwargs )
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/__init__.py", line 321, in _thread
    dn = module.create( properties, container = options.get( 'container' ), superordinate = options.get( 'superordinate' ) )
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_ldap.py", line 155, in wrapper_func
    ret = func( *args, **kwargs )
  File "/usr/lib/pymodules/python2.6/univention/management/console/modules/udm/udm_ldap.py", line 350, in create
    obj.create()
  File "/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py", line 332, in create
    return self._create()
  File "/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py", line 630, in _create
    al.extend(self._ldap_modlist())
  File "/usr/lib/pymodules/python2.6/univention/admin/handlers/users/user.py", line 2255, in _ldap_modlist
    if self.hasChanged('locked'):
  File "/usr/lib/pymodules/python2.6/univention/admin/handlers/users/user.py", line 1683, in hasChanged
    return self.__pwd_is_locked(password) or \
  File "/usr/lib/pymodules/python2.6/univention/admin/handlers/users/user.py", line 1283, in __pwd_is_locked
    if password.startswith('{crypt}!') or password.startswith('{LANMAN}!'):

AttributeError: 'NoneType' object has no attribute 'startswith'


It occured when creating a user with just the person option set due to a missing password value.
Comment 4 Lukas Walter univentionstaff 2013-07-02 16:58:41 CEST
YAML:
=====
product: ucs
release: "3.1"
scope: ucs_3.1-0-errata3.1-1
src: univention-directory-manager-modules
fix: 8.0.143-20.1026.201307021308
note:
version: [1]
desc: |
  This update fixes several issues:
  * In the user module, the mail option has been detached from password
    related properties.
  * A traceback which occured when creating a user with just the person
    option set has been corrected.
bug: [31868, 24351]
Comment 5 Dirk Wiesenthal univentionstaff 2013-07-04 13:51:43 CEST
(In reply to Lukas Walter from comment #4)
> YAML:
> =====
> product: ucs
> release: "3.1"
> scope: ucs_3.1-0-errata3.1-1
> src: univention-directory-manager-modules
> fix: 8.0.143-20.1026.201307021308
> note:
> version: [1]
> desc: |
>   This update fixes several issues:
>   * In the user module, the mail option has been detached from password
>     related properties.
>   * A traceback which occured when creating a user with just the person
>     option set has been corrected.
> bug: [31868, 24351]

There already is a YAML: 2013-06-25-univention-directory-manager-modules.yaml
Comment 6 Lukas Walter univentionstaff 2013-07-04 14:06:59 CEST
I've merged the YAML files.
Comment 7 Alexander Kläser univentionstaff 2013-07-05 11:28:35 CEST
The mail option does not require a password anymore. I can create a user with the options [mail, person] now.

Changing password upon login works for me (strange first it seems not to work). Changing password seems to be fine, as well.

Erratum changes → OK

The test case is missing (could be creating a user with mail + person options set). It should create the user with password=None, otherwise a password is set automatically.

Also the test 20_create_user_just_person can be re-enabled now.

Test cases → FAIL

YAML file → OK

3.2 changes → OK

3.2 changelog → OK
Comment 8 Lukas Walter univentionstaff 2013-07-08 14:42:14 CEST
20_create_user_just_person has been re-enabled.

Added test 39_create_user_person_mail which trys to create a user with person and mail option set but explicitly no password given.
Comment 9 Alexander Kläser univentionstaff 2013-07-08 16:15:26 CEST
OK
Comment 10 Moritz Muehlenhoff univentionstaff 2013-07-10 14:18:54 CEST
http://errata.univention.de/ucs/3.1/147.html