zoukankan      html  css  js  c++  java
  • LDAP-常用命令

    1.recreating default ads instance ./

    [root@dhcppc2 ~]# dsadm delete /usr/local/dsee7/var/dcc/ads    #delete default instance
    [root@dhcppc2 ~]# dsccsetup ads-create      #create default instance            
    [root@dhcppc2 ~]# dsadm start /usr/local/dsee7/var/dcc/ads  #start instance
    [root@dhcppc2 ~]# dsadm list-running-instances 
    

    2.start Cacao, deploy Cacao init-script, register the DSCC agent in Common Agent Container  

    [root@dhcppc2 ~]# cacaoadm start /stop
    [root@dhcppc2 ~]# cacaoadm enable
    [root@dhcppc2 ~]# dsccsetup cacao-reg
    

    3.registering instance to DSCC

    # dsccreg add-server -h hostname instance-install-path
    

    4.list registed instance

    [root@dhcppc2 ~]# dsccreg list-servers
    

    5.create suffix 

    # dsconf create-suffix -h hostname -p port dc=example,dc=com
    Check to see if the suffix has been created.
    $ dsconf list-suffixes -h host -p port -v

    6.import data online

    [root@dhcppc2 ~]# dsconf import -h [hostname] -p [port] [file.ldif] dc=example,dc=com
    [root@dhcppc2 ~]# dsconf import -h hostname IP -p port -e -D cn=DirectoryManager -w [password] -Q dc=example,dc=com [file.ldif]

    7.import data offline

    [root@dhcppc2 ~]# dsadm import $INSTANCEHOME [file.ldif] dc=example,dc=com
    [yn4a@YncmIAM-ESP-b bin]$ ./dsadm import /home/ldap/amsldap /tmp/2014-05-21.ldif dc=test
    新数据将覆盖后缀 dc=test的现有数据。
    必须在所有复制的后缀上执行初始化。
    是否继续 [y/n]? y
    正在导入数据...
    [23/May/2014:10:06:56 +0800] - DEBUG - conn=-1 op=-1 msgId=-1 -  Backend Instance: test
    [23/May/2014:10:06:57 +0800] - Waiting for 6 database threads to stop
    [23/May/2014:10:06:58 +0800] - All database threads now stopped
    [23/May/2014:10:06:59 +0800] - import test: Index buffering enabled with bucket size 100
    ……

    8.export data offline

    [root@dhcppc2 ~]# dsadm export INSTANCEPATH dc=example, dc=com PATN/[file.ldif]

    9.export data online

    [root@dhcppc2 ~]# dsconf export -h IP -p port -e -D cn=DirectoryManager -w password -Q dc=example,dc=com [file.ldif]

    10.list indexes  

    [root@dhcppc2 ~]# dsconf list-indexes -D cn=DirectoryManager --pwd-file password -e -p port -v dc=example, dc=com 

    11. Back Up the Directory Server Data

    [root@dhcppc2 ~]# dsconf backup -h host -p port /tmp/backupArchiveDir

    12. Index an Attribute

    In this example, the preferredLanguage attribute is going to be indexed.
    Create an index entry for the attribute. By default, the index matching types are equity and presence.
    $ dsconf create-index -h host -p port dc=example,dc=com preferredLanguage
    Check that the index entry has been created
    $ dsconf get-index-prop -h host -p port dc=example,dc=com preferredLanguage
    Generate the index for the attribute.
    $ dsconf reindex -h host -p port -t preferredLanguage dc=example,dc=com
    【[root@rusky ~]# dsconf create-index -D cn=DirectorManager--pwd-file password -h hostname -e -p port dc=example,dc=com Attribute】???
    

      

      

      

     


      

     

      

     
  • 相关阅读:
    java 获取json字符串中key对应的值
    location.href跳转页面时传递参数并且在新页面接收参数
    bootstrap table 合并列(只合并相邻的相同项)
    谷歌浏览器输入框清除历史输入记录
    js高德地图支持,java获取高德地图两点间的距离
    ASP.NET Excel 文件导入与导出实例
    Struts2入门---输入验证---验证身份证案例
    Struts2入门---国际化
    Struts2入门---消息处理和类型转换
    Struts2入门---增删改查- 拦截器栈的应用
  • 原文地址:https://www.cnblogs.com/rusking/p/3731130.html
Copyright © 2011-2022 走看看