Solved

LDIFDE to export info to Text file

Posted on 2008-06-25
6
1,013 Views
Last Modified: 2012-05-05
Hi,

I am trying to export information from Active Directory. the fields that I am after are Name, Username, containing OU (as we have AD split into Finance users, Support Users etc..), logon script.
I am trying to use LDIFDE to do this for me, using the command

ldifde -f search.ldf -s local.company.co.uk -d ou "Company Users", -r "(objectClass=user)"

and keep the following error message

Connecting to "local.company.co.uk"
Logging in as current user using SSPI
Exporting directory to search.ldf
Searching for entries
Writing out entries
No Entries found

The command has completed successfully

Can somebody please guide me in the right direction to get the info i need?

Many Thanks,
A
0
Comment
Question by:Lambino81
  • 3
  • 3
6 Comments
 
LVL 26

Accepted Solution

by:
farhankazi earned 350 total points
ID: 21864266
You have to specify full OU distinguished name (DN)
Like:

LDIFDE.exe -F C:\Search.ldf -S local.company.co.uk -D "OU=OUNameHere,DC=COMPANY,DC=CO,DC=UK" -R "(objectClass=user)"

Open in new window

0
 

Author Comment

by:Lambino81
ID: 21864307
Thanks for the reply,

I have now tried this and it is better, but still not producing any results as yet.

Our AD structure is as follows.....

local.company.co.uk
         Company users
                     Head Office
                              Finance Users
                                           user1
                                           user2
                              Support Users
                              Other Users
                     Remote Sites
                               Remote Users 1
                               Remote Users 2

etc......

Do I need to point LDIFDE to each OU (sub OU?), in order to get a list of users? or is there a way of listing all Head office users, regardless of which sub OU they are in?

Thanks,
A
0
 
LVL 26

Expert Comment

by:farhankazi
ID: 21864340
Yes, you need to point LDIFDE to "Head Office" OU.
To get exact OU name apply following statement on Command line (Start -> Run -> Cmd.exe -> OK)

DSQuery OU -Name "Head Office"

Above statement will provide you the exact OU name that you will specify in LDIFDE command.
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 

Author Comment

by:Lambino81
ID: 21864618
Hi farhankazi,

I am still struggling with the concept of this currently,  I ran the DSQuery, and from that put together the following LDIFDE statement.

ldifde -f search.ldf -s local.company.co.uk -d ou="Head Office",ou="Company Users",dc=company,dc=co,do=uk -r "(objectClass=user)"

This is still returning no entries, and as a result, I don't know what to do next.... Is it my filter that needs to be changed?

Thanks,
A
0
 
LVL 26

Expert Comment

by:farhankazi
ID: 21864695
 ou="Head Office",ou="Company Users",dc=company,dc=co,do=uk
^      ^                   ^       ^                         ^                                           ^ --- Wrong

Again you are giving OU DN in a wrong way (simply copy & paste result received from DSQuery to LDIFDE)

OU DN should be in following format:

 "ou=Head Office,ou=Company Users,dc=company,dc=co,do=uk"
0
 

Author Closing Comment

by:Lambino81
ID: 31470500
Thankyou for your help,
I misread your original post, with relation to the "quote's".
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Mapping Drives using Group policy preferences Are you still using old scripts to map your network drives if so this article will show you how to get away for old scripts and move toward Group Policy Preference for mapping them. First things f…
This script can help you clean up your user profile database by comparing profiles to Active Directory users in a particular OU, and removing the profiles that don't match.
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
This tutorial will walk an individual through the process of transferring the five major, necessary Active Directory Roles, commonly referred to as the FSMO roles to another domain controller. Log onto the new domain controller with a user account t…

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now