Jump to content

Recommended Posts

Posted

Hey!

 

Could anyone recommend some sort of script or application that will enable me to generate a list of usernames which are pulled from active directory.

 

I require an ability to extract both the first name and surname as well as the associated login name (possibly even password).

 

The format we use would be much like the following example: Stephen Walden = 'stephenw'

 

Your help would be much appreciated!

 

Steve

Holmfirth J I & N School

Posted

1. ldifde -f export.ldf -s Aserver (Where Aserver is your domain controller and export.ldf is the filename)

 

In theory you can export user accounts by just giving the filename, but I find you need the -s switch to connect to the server. (-s Aserver)

 

Type your ldifde commands in notepad, then save as a .bat file then execute your .bat file from DOS.

 

2. Adding filters with -r

Use the -r switch to filter your data, for example: the command to export only computer objects on a server called Aserver is:

ldifde -f ExportComputer.ldf -s Aserver -r "(objectclass=computer)"

Gradually add to your basic ldifde file, pay attention to the syntax e.g. "speech marks", commas

Exporting only the LDIFDE fields you want with -l (lower case L)

ldifde -f ExportUser.ldf -s Aserver -r "(objectclass=user)" -l "dn, cn, givenName, sn, department"

  • Thanks 1
Posted
theres also csvde built into windows. not used it for a while so can't really remember the syntax of how to use it but i remember it being quite simple.
Posted

CSVDE: Usernames and Contacts only:

 

At the server run:

 

CSVDE -f C:\onlyusers.csv -r objectCategory=person

 

Will create a CSV file called onlyusers.csv in the root of C: on that server.

Posted

Hey!

 

Thanks for all your suggestions . . .

 

I particularly liked Dave P's suggestion to use DumpSec, I found this program to be just what I wanted and more. Well worth the 2meg download.

 

Some of the command line stuff needed further refinement once the content was generated, but DumpSec seemed to do the refinements easily without much effort. :troll:

 

Nice one, thanks for taking the time out to respond,

 

Steve

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...