Filtern eines ldapsearch Ergebnisses
Hallo,
ich führe mit dem folgenden Befehl eine Abfrage gegen ein ADS durch
ldapsearch -LLL -h 172.16.200.4 -x -D "cn=SA-Ldap,ou=ServiceAccounts,ou=USER-IT,dc=EU,dc=xxxx,dc=biz" -w geheim -b "dc=eu,dc=xxxx,dc=biz" -s sub "(&(mail=mmustermman@*)(proxyAddresses=smtp:mmustermann@smtp.de.xxxx.com))" proxyAddresses
und erhalte die folgenden Ergebnisse:
dn: CN=Max Mustermann,OU=NoGP,OU=USER-IT,DC=EU,DC=XXXX,DC=BIZ
proxyAddresses: smtp:mmustermann@smtp.de.XXXX.com
proxyAddresses: MRS:MMustermann@MRS
proxyAddresses: smtp:mmustermann@eu.xxxx.biz
proxyAddresses: X400:c=DE;a= ;p=XXXX;o=Mannheim;s=Mustermann2;g=Max;
proxyAddresses: SMTP:mmustermann@de.xxxx.com
Wie muß ich den Ausdruck verändern, damit mir nur die Zeile
proxyAddresses: smtp:mmustermann@smtp.de.XXXX.com
angezeigt wird? Eine anschließende Bearbeitung des Ausdrucks, zum Beispiel mit grep, entfällt. Mir muß bereits ldapsearch das vollständige Ergebnis liefern.
Danke und viele Grüße,
Stefan
ich führe mit dem folgenden Befehl eine Abfrage gegen ein ADS durch
ldapsearch -LLL -h 172.16.200.4 -x -D "cn=SA-Ldap,ou=ServiceAccounts,ou=USER-IT,dc=EU,dc=xxxx,dc=biz" -w geheim -b "dc=eu,dc=xxxx,dc=biz" -s sub "(&(mail=mmustermman@*)(proxyAddresses=smtp:mmustermann@smtp.de.xxxx.com))" proxyAddresses
und erhalte die folgenden Ergebnisse:
dn: CN=Max Mustermann,OU=NoGP,OU=USER-IT,DC=EU,DC=XXXX,DC=BIZ
proxyAddresses: smtp:mmustermann@smtp.de.XXXX.com
proxyAddresses: MRS:MMustermann@MRS
proxyAddresses: smtp:mmustermann@eu.xxxx.biz
proxyAddresses: X400:c=DE;a= ;p=XXXX;o=Mannheim;s=Mustermann2;g=Max;
proxyAddresses: SMTP:mmustermann@de.xxxx.com
Wie muß ich den Ausdruck verändern, damit mir nur die Zeile
proxyAddresses: smtp:mmustermann@smtp.de.XXXX.com
angezeigt wird? Eine anschließende Bearbeitung des Ausdrucks, zum Beispiel mit grep, entfällt. Mir muß bereits ldapsearch das vollständige Ergebnis liefern.
Danke und viele Grüße,
Stefan
Please also mark the comments that contributed to the solution of the article
Content-Key: 98060
Url: https://administrator.de/contentid/98060
Printed on: April 20, 2024 at 03:04 o'clock
1 Comment
Ich glaub das ist nicht möglich weil LDAP das als einen Wert sieht:
http://www.selfadsi.de/attade2k7.htm
http://www.selfadsi.de/attade2k7.htm