how to extract user DN from AD?

Discussion in 'Windows Server Systems' started by fimchick, Apr 11, 2006.

  1. fimchick

    fimchick OSNN Senior Addict

    Messages:
    276
    Location:
    Somewhere
    hi guys/gals,

    does anyone know of any addins/tools/methods to extract or view the entire DN for a user in active directory?

    i'm trying to get a linux box to authenticate via ldap, but i'm afraid i've made a boo-boo when i wrote out the DN manually.

    Thanks!!!
     
  2. kcnychief

    kcnychief █▄█ ▀█▄ █ Political User Folding Team

    Messages:
    16,948
    Location:
    Massachusetts
  3. fimchick

    fimchick OSNN Senior Addict

    Messages:
    276
    Location:
    Somewhere
    Thanks, I will give it a try!
     
  4. kcnychief

    kcnychief █▄█ ▀█▄ █ Political User Folding Team

    Messages:
    16,948
    Location:
    Massachusetts
    Cool - let me know how it works out. I have only used this tool lightly and haven't attempted that function :)
     
  5. fitz

    fitz Just Floating Along Staff Member Political User Folding Team

    Messages:
    4,076
    Location:
    Chicagoland
    lots of ways..

    You can use vbscript which is very handy.. but you would have to write your own script..

    You can use csvde to export every object in Active directory (you can, of course, add filters to export only the objects you are interested in..). CSVDE will show you the full DN..

    there are other ways too, but, at the moment, I'm rebuilding my laptop.. if you need more ways, or more info on csvde or vbscript examples (hint: google is your friend) then let me know and I can provide more info tomorrow once my laptop is rebuilt.
     
    fimchick likes this.
  6. fimchick

    fimchick OSNN Senior Addict

    Messages:
    276
    Location:
    Somewhere
    Thanks fitz! That's a great one too!!
     
  7. fimchick

    fimchick OSNN Senior Addict

    Messages:
    276
    Location:
    Somewhere
    So i went with CSVDE and it worked great for me. I looked at ADModify but decided not to install since I can't run it over the network. Thanks for your help guys!
     
  8. fitz

    fitz Just Floating Along Staff Member Political User Folding Team

    Messages:
    4,076
    Location:
    Chicagoland
    glad to help :)
     
  9. Electronic Punk

    Electronic Punk Administrator Staff Member Political User Folding Team

    Messages:
    18,590
    Location:
    Copenhagen, Denmark
    Yeah I can vouch for CVSDE

    Here is the command I use:

    csvde -f regions.csv -r objectCategory=person -l "givenName,sN,displayName,department,telephoneNumber,textEncodedORAddress" -d "OU=Regions,DC=landmarc,DC=local"

    That exports to a csv caled regionals, best to extract all columns so you can get the data you want and then lastly you select the OU you want to export.