Well, I'll be the first to ask respectfully if you can post some of your code ~ I'm sure you're not the only one fighting with AD. My assumption, without having seen your code is that your DN is incorrect, or at least not what you really want it to be. For instance.

#LDIF dn: CN=Submersible Toaster, CN=Users, DC=underwater, DC=appliances, DC +=com givenname: Submersible sn: Toaster objectClass: top objectClass: person objectClass: organizationalPerson objectClass: user <insert relevant AD nonsense GUID sUID etc>

So your DN is what places the object into the LDAP tree..again I make the assumption that you are interfacing with LDAP. To put the user someplace else, you need to make that clear in the DN

#LDIF dn: CN=Submersible Toaster, OU=Naughty Boys, DC=underwater, DC=applian +ces, DC=com givenname: Submersible sn: Toaster objectClass: top objectClass: person objectClass: organizationalPerson objectClass: user
Would place Mr Toaster in the "Naughty Boys" OU rather than the "Users" container. I believe you can even reference another LDAP object , sort of symlinking one DN to another. Hence all users could exist in a master branch, but be linked to their relevant OU's , or the other way round. Don't take my word as gospel though - I've never made LDAP or AD actually do this, there is a chunk of documentation tapping me on the shoulder saying that it is possible.


I can't believe it's not psellchecked

In reply to Re: Changing Organizational Unit in Active Directory by submersible_toaster
in thread Changing Organizational Unit in Active Directory by jds

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.