Exportando usuarios do AD para um arquivo texto: Difference between revisions

From Wiki
No edit summary
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 3: Line 3:
'''TO EXPORT AN ACTIVE DIRECTORY USER ACCOUNT'''
'''TO EXPORT AN ACTIVE DIRECTORY USER ACCOUNT'''


1. Open a command prompt, type (all commands should be typed without quotes) "ldifde," and press ENTER.
1. Open a command prompt, type  
 
> ldifde
 
and press ENTER.


2. Type the following commands together (see the example in Step 3).
2. Type the following commands together (see the example in Step 3).


-- Type "-f ..." (path you to which you want the file exported), for example, c:\yourFile.
* Type "-f ..." (path you to which you want the file exported), for example, c:\yourFile.
* Type "-s ..." (server name), for example, your.server.com.
* Type "-t ..." (LDAP port), for example, 389.
* Type "-d ..." (scope), for example, "Cn=Users,DC=yourDomain,DC=com".
* Type "-p ..." (subtree).
* Type "-r ..." (filter), for example, "(objectClass=*)", or, "(&(objectCategory=person)(objectClass=User)(givenname=*))". The second suggestion is recommended.
* Type "-l ..." (list of Active Directory Attributes separated by a comma), for example, "cn,givenName,objectclass,sAMAccountName,mail".


-- Type "-s ..." (server name), for example, your.server.com.
3. Put the command together as follows:


-- Type "-t ..." (LDAP port), for example, 389.
C:\> ldifde -f C:\CraigvincentDomainUsers.ldf -s gavin.craigvincent.com -t 3268 -d "CN=Users,DC=craigvincent,DC=com" -p subtree -r "(&(objectCategory=person)
(objectClass=User)(givenname=*))" -l "cn,givenName,objectclass,samAccountName"


-- Type "-d ..." (scope), for example, "Cn=Users,DC=yourDomain,DC=com".
ou


-- Type "-p ..." (subtree).
C:\> ldifde -f C:\EmpresaX.ldf -s catira -t 3268 -d "DC=empresaX,DC=com,DC=br" -p subtree -r "(&(objectCategory=person)(objectClass=User)(givenname=*))"
          -l "cn,givenName,objectclass,samAccountName"


-- Type "-r ..." (filter), for example, "(objectClass=*)", or, "(&(objectCategory=person)(objectClass=User)(givenname=*))". The second suggestion is recommended.
4. Press ENTER. Note the following output:


-- Type "-l ..." (list of Active Directory Attributes separated by a comma), for example, "cn,givenName,objectclass,sAMAccountName,mail".
Connecting to "gavin.craigvincent.com"
Logging in as current user using SSPI
Exporting directory to file C:\CraigvincentDomainUsers.ldf
Searching for entries...
Writing out entries.......
7 entries exported


3. Put the command together as follows:
The command has completed successfully


C:\Documents and Settings\Administrator>ldifde -f C:\CraigvincentDomainUsers.ldf -s gavin.craigvincent.com -t 3268 -d "CN=Users,DC=craigvincent,DC=com" -p subtree -r "(&(objectCategory=person)(objectClass=User)(givenname=*))" -l "cn,givenName,objectclass,samAccountName"


ou
== Ver também ==
* [[Java: Pega Grupos do Usuario no LDAP| Pega os Grupos de um Usuário no LDAP]]
* [[Pesquisa LDAP com o ldapsearch]]
* [[LDAP: Listando Atributos com o ldapsearch]]
* [[Filtros de Busca por Diretório]]


C:\>ldifde -f C:\EmpresaX.ldf -s catira -t 3268 -d "DC=empresaX,DC=com
,DC=br" -p subtree -r "(&(objectCategory=person)(objectClass=User)(givenname=*))
" -l "cn,givenName,objectclass,samAccountName"


4. Press ENTER. Note the following output:
* [[Microsoft Windows|  Mais Artigos sobre Microsoft Windows]]
* [[Lotus Domino e Notes|  Mais artigos sobre IBM Domino e Notes]]


Connecting to "gavin.craigvincent.com"
[[Category: IBM Domino]]
Logging in as current user using SSPI
[[Category: Lotus Domino]]
Exporting directory to file C:\CraigvincentDomainUsers.ldf
[[Category: LDAP]]
Searching for entries...
[[Category: Microsoft Windows]]
Writing out entries.......
[[Category: Smart Cloud]]
7 entries exported
 
The command has completed successfully

Latest revision as of 13:56, 12 November 2015

An export of an Active Directory user account is helpful for any application that uses an external LDAP since the LDAP is usually the first thing checked when login issues occur. An LDAP export is also helpful if you want to pull a list of users from one corporate directory into another, or if you want to establish a new LDAP account.

TO EXPORT AN ACTIVE DIRECTORY USER ACCOUNT

1. Open a command prompt, type

> ldifde

and press ENTER.

2. Type the following commands together (see the example in Step 3).

  • Type "-f ..." (path you to which you want the file exported), for example, c:\yourFile.
  • Type "-s ..." (server name), for example, your.server.com.
  • Type "-t ..." (LDAP port), for example, 389.
  • Type "-d ..." (scope), for example, "Cn=Users,DC=yourDomain,DC=com".
  • Type "-p ..." (subtree).
  • Type "-r ..." (filter), for example, "(objectClass=*)", or, "(&(objectCategory=person)(objectClass=User)(givenname=*))". The second suggestion is recommended.
  • Type "-l ..." (list of Active Directory Attributes separated by a comma), for example, "cn,givenName,objectclass,sAMAccountName,mail".

3. Put the command together as follows:

C:\> ldifde -f C:\CraigvincentDomainUsers.ldf -s gavin.craigvincent.com -t 3268 -d "CN=Users,DC=craigvincent,DC=com" -p subtree -r "(&(objectCategory=person)
(objectClass=User)(givenname=*))" -l "cn,givenName,objectclass,samAccountName"

ou

C:\> ldifde -f C:\EmpresaX.ldf -s catira -t 3268 -d "DC=empresaX,DC=com,DC=br" -p subtree -r "(&(objectCategory=person)(objectClass=User)(givenname=*))"
         -l "cn,givenName,objectclass,samAccountName"

4. Press ENTER. Note the following output:

Connecting to "gavin.craigvincent.com"
Logging in as current user using SSPI
Exporting directory to file C:\CraigvincentDomainUsers.ldf
Searching for entries...
Writing out entries.......
7 entries exported

The command has completed successfully


Ver também