Community
    • Categories
    • Recent
    • Popular
    • Users
    • Search
    • Register
    • Login

    Massenimport von Benutzern

    Scheduled Pinned Locked Moved Allgemein
    2 Posts 2 Posters 1.4k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • U Offline
      urebmann
      last edited by

      Hallo zusammen,

      wir haben jetzt 1.0 sehr erfolgreich im Einsatz.
      Nun möchten wir gerne alle LDAP-Benutzer als Massenimport in die DB einfügen.

      Wäre das folgende Statement geeignet, den Import zu machen?

      INSERT INTO isys_obj SET isys_obj__title = 'Vorname Nachname', isys_obj__isys_obj_type__id = (SELECT isys_obj_type__id FROM isys_obj_type WHERE isys_obj_type__const = 'C__OBJTYPE__PERSON'), isys_obj__created_by = 'massimport', isys_obj__created = NOW(), isys_obj__updated = NOW(), isys_obj__updated_by = 'massimport', isys_obj__isys_cmdb_status__id =6, isys_obj__status = 2;

      SET @OBJID = LAST_INSERT_ID();

      INSERT INTO isys_catg_global_list SET isys_catg_global_list__isys_obj__id = @OBJID;
      INSERT INTO isys_cats_person_list SET isys_cats_person_list__isys_obj__id = @OBJID, isys_cats_person_list__title = 'username', isys_cats_person_list__user_pass = MD5('pass'), isys_cats_person_list__first_name = 'Vorname', isys_cats_person_list__last_name = 'Nachname';

      Der Plan wäre eine Datei zu generieren, welche für jeden Benutzer so ein Insert-Statement beinhaltet.

      lg uli

      1 Reply Last reply Reply Quote 0
      • LFischerL Offline
        LFischer
        last edited by

        Hallo Uli,

        das Statement sieht schon sehr gut aus und funktioniert auch soweit - Allerdings fehlt dort noch die Angabe einer Sys-ID. Diese muss eine eindeutige Nummer im folgenden Format enthalten: "SYSID_1234567890". Die Sys-ID besteht normalerweise aus dem Timestamp + Objekt-ID.
        Die Personen-Objekte sind zwar auch ohne Sys-ID verwendbar, jedoch könnte es bei Objekt-Referenzierungen zu Problemen geben, wenn diese nicht eingepflegt wurde.

        Viele Grüße Leo

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post