Options

Create Windows Logins using C/SIDE

zaloo78zaloo78 Member Posts: 9
Hey,

I was wondering if anyone of you guys know if it is possible to create windows logins using code (C/SIDE). Instead of going in a manually add user using the Security -> Windows Logins form.

Comments

  • Options
    klavinklavin Member Posts: 117
    Make a lookup on Windows Object table for the user, when you get it take the SID and create a variable for Windows Login table...
    WindowsLogin.INIT;
    WindowsLogin.SID := WindowsObject.SID;
    WindowsLogin.INSERT;
    
    -Lavin
    "Profanity is the one language all programmers know best."
  • Options
    Johannes_NielsenJohannes_Nielsen Member Posts: 206
    Neat..

    Alternatively I guess you could (manually) add an AD security user group, I you want to easily manage multiple Windows logins with the same credentials...
    Best regards / Venlig hilsen
    Johannes Sebastian
    MB7-840,MB7-841
  • Options
    klavinklavin Member Posts: 117
    Really, you could do the same. The lookup will show both unless you filter for WindowsObject.Type as group. I would imagine this would be very slow, but these have SID's as well where the above would insert it also. Either way you would have to know the SID so I would assume there would be *some* user interaction so why not just go to the appropriate areas.

    When I was at an end-user company (actually on my way out) I made a New User Checklist form for them that would create the SQL user, Windows Login, copy permissions or set manually copy user setups, create/copy menus etc by clicking buttons. They just had to lookup who they wanted to add. This just centralized adding users so no one had to

    I guess I'm split on just using he forms and making it so any repetitive task done easier...
    -Lavin
    "Profanity is the one language all programmers know best."
Sign In or Register to comment.