歡迎您光臨本站 註冊首頁

ldapmodify 求助

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

ldapmodify 求助

各位大人,小弟剛開始學習ldap,工作中遇到問題,我如何應用ldapmodify把下面「ExternalAuthenticationService」 改成別的值,例如「InternalAuthenticationService」, 希望大家能給予幫助,幫我度過學習初期。

謝謝

dn: ou=default,ou=OrganizationConfig,ou=1.0,ou=ExternalAuthenticationService,o
u=services,o=oamplatform
objectClass: top
objectClass: sunServiceComponent
《解決方案》

回復 #1 acerjsj 的帖子

哪位能幫助下呢,給些思路也感激不盡。等攢夠分就貢獻出去
《解決方案》

dn: ou=default,ou=OrganizationConfig,ou=1.0,ou=ExternalAuthenticationService,o
u=services,o=oamplatform

我想知道你這是一行還是兩行~
另外你要寫出你的DN是什麼這個很關鍵~~
《解決方案》

多謝樓上的回答,下面是我查詢的結果,那個是應該是在一行。
$ ldapsearch -D"cn=directory manager" -w d                                                                             irectory -b "ou=OrganizationConfig,ou=1.0,ou=ExternalAuthenticationService,ou=se                                                                             rvices,o=oamplatform" -s sub "ou=default"
version: 1
dn: ou=default,ou=OrganizationConfig,ou=1.0,ou=ExternalAuthenticationService,o
u=services,o=oamplatform
objectClass: top
objectClass: sunServiceComponent
ou: default
sunkeyvalue: iplanet-ext-auth-password-encryption-method=none
sunkeyvalue: iplanet-ext-auth-authorization-action-string=Login
sunkeyvalue: iplanet-ext-auth-authorization-resource-identifier=easpv
sunkeyvalue: iplanet-ext-auth-nds-attr-mapping={urn:verizon:sane}lastName=sn
sunkeyvalue: iplanet-ext-auth-nds-attr-mapping={urn:verizon:sane}unixLoginShel
l=loginshell
sunkeyvalue: iplanet-ext-auth-local-role-mapping=eas=cemsadm
sunkeyvalue: iplanet-ext-auth-invocation-timeout=100
sunkeyvalue: iplanet-ext-auth-nds-attr-mapping={urn:verizon:sane}email=mail
sunkeyvalue: iplanet-ext-auth-password-authentication-default-wsdl-namespace=
sunkeyvalue: iplanet-ext-auth-password-authentication-default-wsdl-soap-action
=
sunkeyvalue: iplanet-ext-auth-password-digest=false
sunkeyvalue: iplanet-ext-auth-secondary-uddi-registry-url=
sunkeyvalue: iplanet-ext-auth-authorization-action-namespace=
sunkeyvalue: iplanet-ext-auth-nds-attr-mapping={urn:verizon:sane}unixUID=uidnu
mber
sunkeyvalue: iplanet-ext-auth-valid-login-shells=
sunkeyvalue: iplanet-ext-auth-password-authentication-default-wsdl-encoding-st
yle=
sunkeyvalue: iplanet-ext-auth-nds-attr-mapping={urn:verizon:sane}pagerPin=ss-p
agerpin
sunkeyvalue: iplanet-ext-auth-password-authentication-service-name=Authenticat
ionService
sunkeyvalue: iplanet-ext-auth-nds-attr-mapping={urn:verizon:sane}unixHomeDir=h
omedirectory
sunkeyvalue: iplanet-ext-auth-nds-attr-mapping={urn:verizon:sane}phoneNumber=t
elephonenumber
sunkeyvalue: iplanet-ext-auth-nds-attr-mapping={urn:verizon:sane}firstName=giv
enname
sunkeyvalue: iplanet-ext-auth-exclude-user=
sunkeyvalue: iplanet-ext-auth-valid-home-dir-prefixes=
sunkeyvalue: iplanet-ext-auth-alarm-status=
sunkeyvalue: iplanet-ext-auth-saml-authority-service-name=SAMLResponder
sunkeyvalue: iplanet-ext-auth-nds-attr-mapping={urn:verizon:sane}primaryRole=s
s-primaryrole
sunkeyvalue: iplanet-ext-auth-nds-attr-mapping={urn:verizon:sane}unixUserName=
uid
sunkeyvalue: iplanet-ext-auth-trusted-issuer-xmlsig-verification=false
sunkeyvalue: iplanet-ext-auth-nds-attr-mapping={urn:oasis:names:tc:xacml:2.0:s
ubject:role}role=nsroledn
sunkeyvalue: iplanet-ext-auth-nds-attr-mapping={urn:verizon:sane}pagerServiceN
umber=pager
sunkeyvalue: iplanet-ext-auth-password-authentication-wsdl-operation=
sunkeyvalue: iplanet-ext-auth-initialized=false
sunkeyvalue: iplanet-ext-auth-nds-attr-mapping={urn:verizon:sane}role=nsroledn
sunkeyvalue: iplanet-ext-auth-primary-uddi-registry-url=http://47.154.135.189:
8080/RegistryServer/
《解決方案》

這個可以把所有資料都重新匯入一次~~
ldapseach -x -h hostname -W > file.ldif

用vi修改file.ldif
把ExternalAuthenticationService替換成InternalAuthenticationService
再重新匯入一次,如果你感覺命令行方式不方便~
可以裝phpadminldap這個有複製功能~複製的時候把ExternalAuthenticationService改成你想要的就OK了~

[火星人 ] ldapmodify 求助已經有302次圍觀

http://coctec.com/docs/service/show-post-28530.html