Bug 36450 - The string length of Windows and CSV import are not compatible.
The string length of Windows and CSV import are not compatible.
Status: CLOSED FIXED
Product: UCS@school
Classification: Unclassified
Component: UMC - CSV Import
UCS@school 3.2 R2
Other Linux
: P5 normal (vote)
: UCS@school 3.2 R2 Errata
Assigned To: Sönke Schwardt-Krummrich
Florian Best
:
Depends on: 37027
Blocks: 37154
  Show dependency treegraph
 
Reported: 2014-11-05 13:45 CET by Marcel Rehberg
Modified: 2015-02-27 15:18 CET (History)
3 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
Manual (1.03 MB, application/pdf)
2014-11-26 08:13 CET, Jan Christoph Ebersbach
Details
Data import "Business" (493.43 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-11-26 08:14 CET, Jan Christoph Ebersbach
Details
Data import "School" (493.44 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-11-26 08:15 CET, Jan Christoph Ebersbach
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel Rehberg univentionstaff 2014-11-05 13:45:29 CET
The string length of Windows (max. 20) and CSV import (unlimited) are not compatible. The user name is not truncated after 20 characters .

A suggestion would be that a warning message is displayed with the following content.
'The user name contains more than 20 characters.'
Comment 1 Jan Christoph Ebersbach univentionstaff 2014-11-11 15:46:49 CET
This issue has been reported by another customer.  The generated username is too long for Samba which silently leads to problems in the S4 connector.

An even better solution would be if the import would try to suggest different usernames that don't exceed 20 characters.
Comment 2 Jan Christoph Ebersbach univentionstaff 2014-11-11 16:56:44 CET
Considering the exam mode, usernames shouldn't be longer than 20 - len(ucr get ucsschool/ldap/default/userprefix/exam) → 15 characters by default!
Comment 3 Jan Christoph Ebersbach univentionstaff 2014-11-26 08:13:48 CET
Created attachment 6467 [details]
Manual
Comment 4 Jan Christoph Ebersbach univentionstaff 2014-11-26 08:14:53 CET
Created attachment 6468 [details]
Data import "Business"
Comment 5 Jan Christoph Ebersbach univentionstaff 2014-11-26 08:15:09 CET
Created attachment 6469 [details]
Data import "School"
Comment 6 Jan Christoph Ebersbach univentionstaff 2014-11-26 08:16:27 CET
LMZ created a sophisticated workaround for this and other issues with the CSV import.  See attached files.
Comment 7 Sönke Schwardt-Krummrich univentionstaff 2014-12-03 09:44:37 CET
A check should be added that usernames cannot be longer than (20 - len(ucr get ucsschool/ldap/default/userprefix/exam)) characters.
The CSV import should show an error (red cell) if a username is longer.

Please also add a changelog entry to 
ucs-school-3.2r2/doc/changelog/release-notes-ucsschool-3.2R2v4-de.xml 
(maybe this file does not exist yet).
Comment 8 Sönke Schwardt-Krummrich univentionstaff 2015-02-12 17:26:27 CET
The CSV import module and the users wizard now check the length of usernames.
The username may not be longer than (20 - len(ucr get ucsschool/ldap/default/userprefix/exam)) characters.
Otherwise the CSV import module marks the cell in red. The users wizard shows an exclamation mark and a corresponding tooltip message.

The error messages also mention the maximum allowed username length, that is calculated depending on the UCR variable ucsschool/ldap/default/userprefix/exam.

By default, the UCR variable is empty and the prefix "exam-" is used.

ucs-school-umc-wizards (4.0.32-1) unstable; urgency=low

r58009 | Bug #36450: limit length of usernames to prevent windows logon errors

Changelog entry has been made.

Package has been rebuilt.
Comment 9 Sönke Schwardt-Krummrich univentionstaff 2015-02-18 14:38:21 CET
As discussed with Stefan, the "error" message (red) should be rather a "warning" (yellow).
Comment 10 Sönke Schwardt-Krummrich univentionstaff 2015-02-21 21:55:17 CET
The username length is now enforced within the "Students (Schools)" wizards.
By setting ucsschool/ldap/check/username/lengthlimit=false the limitation can be disabled.

r58328 | Bug #36450: added UCR variable to disable length limit of usernames: ucsschool/ldap/check/username/lengthlimit
r58327 | Bug #36450: show warning if max length of usernames is exceeded to prevent problems with windows logons
r58009 | Bug #36450: limit length of usernames to prevent windows logon errors

ucs-school-umc-csv-import (1.0.27-1) unstable; urgency=medium
ucs-school-umc-wizards (4.0.33-1) unstable; urgency=low

Please test both UMC modules. And also the 3 states of the new UCR variable (undefined, true, false).
Comment 11 Florian Best univentionstaff 2015-02-23 15:25:39 CET
Fix: OK

(In reply to Sönke Schwardt-Krummrich from comment #7)
> Please also add a changelog entry to 
> ucs-school-3.2r2/doc/changelog/release-notes-ucsschool-3.2R2v4-de.xml 
> (maybe this file does not exist yet).
REOPEN: "will be highlighted with a »red« cell background"
REOPEN: "the CSV import module restricts" → is restrict the right word as this is now optional.
Comment 12 Sönke Schwardt-Krummrich univentionstaff 2015-02-24 09:59:38 CET
(In reply to Florian Best from comment #11)
> Fix: OK
> 
> (In reply to Sönke Schwardt-Krummrich from comment #7)
> > Please also add a changelog entry to 
> > ucs-school-3.2r2/doc/changelog/release-notes-ucsschool-3.2R2v4-de.xml 
> > (maybe this file does not exist yet).
> REOPEN: "will be highlighted with a »red« cell background"
> REOPEN: "the CSV import module restricts" → is restrict the right word as
> this is now optional.

fixed XML changelog
Comment 13 Florian Best univentionstaff 2015-02-24 11:10:44 CET
Fix: OK
Changlog: OK (fix typo svn r58380)
Comment 14 Sönke Schwardt-Krummrich univentionstaff 2015-02-27 15:18:36 CET
UCS@school 3.2 R2 v3 has been released:
http://docs.univention.de/release-notes-ucsschool-3.2R2v3-de.html

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