Ldap client: Unterschied zwischen den Versionen

Aus xinux.net
Zur Navigation springen Zur Suche springen
Zeile 42: Zeile 42:
  
 
=ldapdelete=
 
=ldapdelete=
ldapdelete opens a connection to an LDAP server, binds, and deletes one or more entries. If one or more dn arguments are provided, entries with those Distinguished Names are deleted. Each dn should be a string-represented DN as defined in RFC 1779. If no dn arguments are provided, a list of DNs is read from standard input (or from file if the -f flag is used).
+
ldapdelete dient dazu auf einem LDAP-Server einen oder mehrere Einträge zu löschen. Falls ein oder mehrere DN (Distinguished Name) angegeben werden, werden dieser (oder diese) gelöscht. Falls kein DN angegeben wird, erfolgt das Einlesen über die Standardeingabe.
 
<pre>
 
<pre>
ldapdelete 'cn=Thomas Will,o=TUDelft,c=DE'  
+
ldapdelete 'cn=Thomas Will,dc=linuggs,dc=DE'  
  
ldapdelete -v 'cn=Thomas Will,o=TUDelft,c=NL' -D 'cn=Jan Leininger,o=TUDelft,c=DE' -W  
+
ldapdelete -v 'cn=Thomas Will,dc=linuggs,dc=DE' -D 'cn=Jan Leininger,dc=linuggs,dc=DE' -W  
 
</pre>
 
</pre>
  

Version vom 19. Dezember 2014, 09:53 Uhr

installation

apt-get install ldap-utils

ldapsearch

 ldapsearch  -x -b dc=linuggs,dc=de -D "cn=admin,dc=linuggs,dc=de" -w sysadm -LLL
  • -x simple bind
  • -b dc=linuggs,dc=de (basis root)
  • -D "cn=admin,dc=linuggs,dc=de" zu benutzender Account
  • -w sysadm Passwort
  • -LLL weniger Ausgaben

ldapadd

ldapadd -x -D cn=admin,dc=linuggs,dc=de -w sysadm -f service-container.ldif

ldapmodify

add

ldpamodify -xD "cn=admin,dc=linuggs,dc=de" -W
dn: uid=thomas.will,ou=linuggs.de,ou=Domains,dc=linuggs,dc=de
changetype: modify
add: mailAlternateAddress
mailAlternateAddress: thomas@linuggs.de
-
add: mailAlternateAddress
mailAlternateAddress: thomas.will@schmeich.de
-
add: mailForwardingAddress
mailForwardingAddress: barzi@gmail.com

delete

ldpamodify -xD "cn=admin,dc=linuggs,dc=de" -W
dn: uid=thomas.will,ou=linuggs.de,ou=Domains,dc=linuggs,dc=de
changetype: modify
delete: mailForwardingAddress

replace

dn: uid=thomas.will,ou=linuggs.de,ou=Domains,dc=linuggs,dc=de
changetype: modify
replace: mailMessageStore
mailMessageStore: /home/thomas/

ldapdelete

ldapdelete dient dazu auf einem LDAP-Server einen oder mehrere Einträge zu löschen. Falls ein oder mehrere DN (Distinguished Name) angegeben werden, werden dieser (oder diese) gelöscht. Falls kein DN angegeben wird, erfolgt das Einlesen über die Standardeingabe.

ldapdelete 'cn=Thomas Will,dc=linuggs,dc=DE' 

ldapdelete -v 'cn=Thomas Will,dc=linuggs,dc=DE' -D 'cn=Jan Leininger,dc=linuggs,dc=DE' -W 

ldappasswd

ldappasswd -x -D "cn=admin,dc=xinux,dc=org" -w sysadm "uid=nuttela,ou=users,dc=xinux,dc=org"  -s wiggel

links