Bug 46235 - --dry-run doesn't recognize already existing usernames
Summary: --dry-run doesn't recognize already existing usernames
Status: CLOSED DUPLICATE of bug 45715
Alias: None
Product: UCS@school
Classification: Unclassified
Component: Import scripts
Version: UCS@school 4.2
Hardware: Other other
: P5 normal
Target Milestone: ---
Assignee: UCS@school maintainers
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-02-07 13:38 CET by Michael Grandjean
Modified: 2023-06-12 15:39 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.114
Enterprise Customer affected?:
School Customer affected?: Yes
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Customer ID: 39720
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Grandjean univentionstaff 2018-02-07 13:38:29 CET
root@ucs01:~# univention-app info
UCS: 4.2-3 errata284
App Center compatibility: 4
Installed: ucsschool=4.2 v7

When running ...

> /usr/share/ucs-school-import/scripts/ucs-school-user-import --dry-run [...]

... the dry-run will not detect or warn about duplicates of usernames.

Scenario:

There's a user Mary Somerville with the username "m.somerville" that was created by any other method than "ucs-school-user-import" (e.g. via UMC/UDM or older import tools).
Now I want to import a bunch of users via "ucs-school-user-import" and one of those users is Michael Somerville. My import schema config will use "m.somerville" as username. The dry-run will NOT warn me that "m.somerville" already exists nor will it append the counter. 
A real import without --dry-run will then fail to create "m.somerville", because a user with this username already exists.
Comment 1 Daniel Tröder univentionstaff 2018-02-12 09:31:56 CET
(In reply to Michael Grandjean from comment #0)
> root@ucs01:~# univention-app info
> UCS: 4.2-3 errata284
> App Center compatibility: 4
> Installed: ucsschool=4.2 v7
> 
> When running ...
> 
> > /usr/share/ucs-school-import/scripts/ucs-school-user-import --dry-run [...]
> 
> ... the dry-run will not detect or warn about duplicates of usernames.
> 
> Scenario:
> 
> There's a user Mary Somerville with the username "m.somerville" that was
> created by any other method than "ucs-school-user-import" (e.g. via UMC/UDM
> or older import tools).
From the point of view of the import (concept), that is the same as a user imported with sourceUID="".

> Now I want to import a bunch of users via "ucs-school-user-import" and one
> of those users is Michael Somerville. My import schema config will use
> "m.somerville" as username. The dry-run will NOT warn me that "m.somerville"
> already exists nor will it append the counter. 
> A real import without --dry-run will then fail to create "m.somerville",
> because a user with this username already exists.

This is one of the cases, where the validity test is left up to UDM - and thus does not happen in the dry-run. This test can easily be done without UDM though, adding it to the list of Bug #45715.

*** This bug has been marked as a duplicate of bug 45715 ***