메뉴 건너뛰기

?

단축키

Prev이전 문서

Next다음 문서

가 크게 작게 위로 아래로 댓글로 가기
Extra Form
출처 https://docs.oracle.com/cd/B10501_01/net...mtools.htm
Oracle9i Directory Service Integration and Deployment Guide
Release 2 (9.2)

Part Number A96579-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents
Go To Index
Index

Master Index

Feedback

Go to previous page Go to next page

B
LDAP Command-Line Tools

LDAP protocol operations are divided into three categories: authentication, interrogation, and update and control. The LDAP C-API provides a number of simple command-line tools that together cover all three categories.

The appendix covers the following topics:

LDAP Command-Line Tools

This section introduces six popular command-line tools. The section "Optional Arguments for Command-Line Tools", immediately following, defines the optional arguments used in the command descriptions and examples.

These are the six commands:


ldapbind

Use the command-line tool ldapbind to authenticate to a directory server. You can also use ldapbind to find out if the server is running.

Syntax

ldapbind [options]

Example

ldapbind -h myhost -p 389 -D "cn=orcladmin" -w welcome

This command authenticates user orcladmin to the directory server myhost located at port 389, using the password welcome.


ldapsearch

Use the command-line tool ldapsearch to search for specific entries in a directory. ldapsearch opens a connection to a directory, authenticates the user performing the operation, searches for the specified entry, and prints the result in a format that the user specifies.

Syntax

ldapsearch  [options]  filter [attributes]

Example

ldapsearch -h myhost -p 389 -s base -b "ou=people,dc=acme,dc=com" \ 
"objectclass=*"

This command searches the directory server myhost, located at port 389. The scope of the search (-s) is base, and the part of the directory searched is the base DN (-b) designated. The search filter "objectclass=*" means that values for all of the entry's object classes are returned. No attributes are returned because they have not been requested. The example assumes anonymous authentication because authentication options are not specified.


ldapadd

Use the command-line tool ldapadd to add entries to the directory. ldapadd opens a connection to the directory and authenticates the user. Then it opens the LDIF file supplied as an argument and adds, in succession, each entry in the file.

Syntax

ldapadd [options] [-f LDIF-filename]

Example

ldapadd -h myhost -p 389 -D "cn=orcladmin" -w welcome -f jhay.ldif

Using this command, user orcladmin authenticates to the directory myhost, located at port 389. The command then opens the file jhay.ldif and adds its contents to the directory. The file might, for example, add the entry uid=jhay,cn=Human Resources,cn=acme,dc=com and its object classes and attributes.

See Also:

"LDIF" for details about LDIF file syntax


ldapdelete

Use the command-line tool ldapdelete to remove leaf entries from a directory. ldapdelete opens a connection to a directory server and authenticates the user. Then it deletes specified entries.

Syntax

ldapdelete [options] "entry DN"

Example

ldapdelete -h myhost -p 389 -D "cn=orcladmin" -w welcome \
"uid=hricard,ou=sales,ou=people,dc=acme,dc=com"

This command authenticates user orcladmin to the directory myhost, using the password welcome. Then it deletes the entry uid=hricard,ou=sales,ou=people,dc=acme,dc=com.


ldapmodify

Use the command-line tool ldapmodify to modify existing entries. ldapmodify opens a connection to the directory and authenticates the user. Then it opens the LDIF file supplied as an argument and modifies the LDAP entries specified by the file.

ldapmodify uses a modified form of an LDIF file. Within the file itself, you use the attribute changetype to specify the type of change. An example is changetype: add.

Four types of changes are possible:

  • add--adds a new entry
  • modify--changes an existing entry, that is, it adds, deletes, or replaces attributes of the entry
  • delete--deletes an existing entry
  • modrdn--modifies the RDN of an existing entry

Syntax

ldapmodify [options] [-f LDIF-filename]

Example

ldapmodify -h myhost -p 389 -D "cn=orcladmin" -w welcome -f hricard.ldif

Using this command, user orcladmin authenticates to the directory myhost, located at port 389. The command then opens the file hricard.ldif and modifies the directory entries specified by the file. The file might, for example, change the telephone number attribute of entry uid=hricard,cn=sales,cn=acme,dc=com.


Note:

You can use ldapmodify instead of ldapadd and ldapdelete to add or delete entries.



ldapmoddn

Use the command-line tool ldapmoddn to:

  • change the RDN of an entry
  • move an entry or subtree to another location in the directory

Syntax

ldapmoddn [options] -b "current DN" -R "new RDN" -N "new Parent"

Example

ldapmoddn -h myhost -p 389 -D "cn=orcladmin" -w welcome \
-b "uid=oball,ou=sales,ou=people,dc=acme,dc=com" \
-N "ou=marketing,ou=people,dc=acme,dc=com"

This command authenticates user orcladmin to the directory myhost, using the password welcome. Then it assigns to the entry uid=oball,ou=sales,ou=people,dc=acme,dc=com a new parent entry, ou=marketing,ou=people,dc=acme,dc=com.

Optional Arguments for Command-Line Tools

Table B-1 defines the optional arguments used in the command descriptions and examples.

Table B-1 Commonly Used Command-Line Options
OptionDescription

-h

The host name of the directory server

-p

The port number of the directory server

-D

The bind DN--that is, the user authenticating to the directory

-w

The bind password in simple authentication

-W

Wallet location for one- or two-way SSL authentication

-P

Wallet password

-U

SSL authentication mode:

  • 1 for no authentication
  • 2 for one-way authentication
  • 3 for two-way authentication

-bFoot 1

The base DN for a search:

-sFoot 2

Search scope:

  • base--the entry requested
  • one--the entries just below the requested entry
  • sub--the entire subtree

-f

The LDIF file containing additions, deletions, or modifications

-R

New RDN

-N

New parent for an entry or subtree that is moved


  1. No Image 10Sep
    by
    2020/09/10 Views 1203 

    LDAP / SSO Authentication

  2. Oralce DB 백업(덤프) 하는 방법(exp, expdp툴 사용)

  3. No Image 09Sep
    by
    2020/09/09 Views 504 

    새로운 Oracle export/import 유틸리티 - Oracle Data Pump(expdp/impdp)

  4. Oracle LDAP INSTALLATION AND CONFIGURATION

  5. 09Sep
    by 정보제공
    2020/09/09 Views 2014 

    LDAP Command-Line Tools - Oracle9i Directory Service Integration and Deployment Guide Release 2 (9.2)

  6. No Image 09Sep
    by
    2020/09/09 Views 540 

    CentOS 7 에 OpenLDAP 설치

  7. No Image 09Sep
    by
    2020/09/09 Views 546 

    CentOS 7 에 Oracle 11g r2 설치 1/5

  8. CentOS 6.2 에 Oracle 11g 설치

  9. No Image 09Sep
    by
    2020/09/09 Views 509 

    Red Hat Enterprise Linux 7.x에서 Oracle 12c 릴리스 2 그리드 및 RAC 데이터베이스를 구축하는 방법

  10. No Image 07Sep
    by
    2020/09/07 Views 479 

    OpenLDAP을 활용한 기반시스템 중앙 인증관리 #1

  11. No Image 07Sep
    by
    2020/09/07 Views 493 

    OpenLDAP을 활용한 기반시스템 중앙 인증관리 #2

  12. No Image 25Aug
    by
    2020/08/25 Views 496 

    LDAP 클라이언트를 사용하여 Oracle Directory Server Enterprise Edition 설정

  13. No Image 25Aug
    by
    2020/08/25 Views 489 

    LDAP (Lightweight Directory Access Protocol)

  14. Splunk 기능 및 용어 설명

  15. 세상을 바꾸는 Oracle 데이터베이스 - Oracle 변천사

  16. MYSQL 일반적인 오류 해결 정보

  17. 빅데이터분석 기사 자격증 생긴다...2020년 하반기 취득 가능

  18. QlikTech의 BI솔루션 QlikView

  19. 한림대의료원, 임상정보 빅데이터 분석솔루션 도입 추진

  20. DW, DM, OLAP의 이해

목록
Board Pagination Prev 1 2 3 4 5 6 7 Next
/ 7