Bug 25174 - CLI: Modify eines nicht vorhandenen Objekts
CLI: Modify eines nicht vorhandenen Objekts
Status: RESOLVED DUPLICATE of bug 38110
Product: UCS
Classification: Unclassified
Component: UDM - CLI
UCS 3.0
Other Linux
: P5 normal (vote)
: UCS 4.0-x
Assigned To: UMC maintainers
:
: 22620 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-05 14:49 CET by Stefan Gohmann
Modified: 2018-04-13 13:28 CEST (History)
6 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:
klaeser: Patch_Available+


Attachments
Patch (1.33 KB, patch)
2012-02-15 17:48 CET, Lukas Walter
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Gohmann univentionstaff 2011-12-05 14:49:30 CET
Wenn ein Objekt nicht vorhanden ist, dann wird die Meldung angezeigt, dass Primary group required ist.


info 2011-12-05 11:32	 EXECUTING: univention-directory-manager 'computers/windows' modify --dn "cn=sgtfcelk,cn=computers,dc=deadlock41,dc=local" --set "network=cn=xkzlnhck,cn=networks,dc=deadlock41,dc=local"
Traceback (most recent call last):
  File "/usr/share/univention-directory-manager-tools/univention-cli-server", line 233, in doit
    output = univention.admincli.admin.doit(arglist)
  File "/usr/lib/pymodules/python2.6/univention/admincli/admin.py", line 882, in doit
    object.open()
  File "/usr/lib/pymodules/python2.6/univention/admin/handlers/computers/windows.py", line 399, in open
    self['primaryGroup']=None
  File "/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py", line 2470, in __setitem__
    super(simpleComputer, self).__setitem__(key, value)
  File "/usr/lib/pymodules/python2.6/univention/admin/handlers/__init__.py", line 214, in __setitem__
    raise univention.admin.uexceptions.valueRequired, _('The property %s is required') % self.descriptions[key].short_description
valueRequired: The property Primary group is required
Comment 1 Sönke Schwardt-Krummrich univentionstaff 2011-12-09 21:20:22 CET
*** Bug 22620 has been marked as a duplicate of this bug. ***
Comment 2 Florian Best univentionstaff 2011-12-14 09:16:19 CET
(In reply to comment #0)
> Wenn ein Objekt nicht vorhanden ist, dann wird die Meldung angezeigt, dass
> Primary group required ist.
Das Problem tritt auch bei existierenden Objekten auf.
# echo $ldap_base
dc=product,dc=test
# univention-admin users/user modify --dn uid=user1,dc=users,$ldap_base --set password=foobarasdf --set primaryGroup="cn=Domain Users,cn=groups,$ldap_base"
Comment 3 Sönke Schwardt-Krummrich univentionstaff 2012-02-15 14:25:23 CET
Wie besprochen, bitte in simpleLdap.open() beheben. Die dort geworfene Exception sollte im CLI abgefangen und unter Angabe des nicht abrufbaren DN (ohne Traceback) ausgegeben werden.
Comment 4 Lukas Walter univentionstaff 2012-02-15 17:48:24 CET
Created attachment 4183 [details]
Patch

Das Problem besteht darin, dass die bei nicht vorhandenen Objekten geworfene Exception nicht an den Punkt gelangt, an dem sie abgefangen werden sollte, da der Aufruf von "self.lo.get(self.dn)" in simpleLdap nicht "required=True" übergibt.

Zudem wird an der Stelle an der diese Exception eigentlich abgefangen werden sollte nur auf univention.admin.uexceptions.noObject gewartet, nicht auf ldap.NO_SUCH_OBJECT.

Der Patch behebt beides.


Könnte er eventuell Probleme mit dem AD/S4-Connector erzeugen?
Comment 5 Sönke Schwardt-Krummrich univentionstaff 2012-02-16 09:13:01 CET
Bitte mal den Patch auf einem Testsystem mit Samba4 und S4-Connector einspielen und dann den Web-UDM, CLI sowie die Funktion des S4-Connectors prüfen.
Comment 6 Alexander Kläser univentionstaff 2012-06-01 14:00:27 CEST
(In reply to comment #5)
> Bitte mal den Patch auf einem Testsystem mit Samba4 und S4-Connector einspielen
> und dann den Web-UDM, CLI sowie die Funktion des S4-Connectors prüfen.

Die Synchronisierung kann über univention-ldapsearch und univention-s4search (→ Suche im AD-LDAP) überprüft werden.
Comment 7 Tim Petersen univentionstaff 2015-03-11 15:42:03 CET
Again at Ticket#2015031121000326.
Comment 8 Florian Best univentionstaff 2015-03-24 16:27:12 CET
(In reply to Lukas Walter from comment #4)
> Created attachment 4183 [details]
> Patch
I would like the second file in that patch to be applied.
Comment 9 Florian Best univentionstaff 2016-05-13 12:47:23 CEST
Comment on attachment 4183 [details]
Patch

The patch is incomplete and has been replaced by attachment 7662 [details].
Comment 10 Florian Best univentionstaff 2016-05-13 12:47:36 CEST

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