Solved

LDIFDE to export info to Text file

Posted on 2008-06-25
6
1,017 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Cannot access RDP (AD 2012) 6 46
Windows 2012 R2 DNS ListenAddresses Null Value 4 31
Remote login in windows 7 8 34
ADFS MSIS7065 error 8 8
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
A company’s centralized system that manages user data, security, and distributed resources is often a focus of criminal attention. Active Directory (AD) is no exception. In truth, it’s even more likely to be targeted due to the number of companies …
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

735 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