User Tools

Site Tools


linux:scripts:ldap

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux:scripts:ldap [2017/12/19 09:45]
lunetikk
linux:scripts:ldap [2017/12/19 09:45] (current)
Line 14: Line 14:
 #get a mailaddress by "CN -> commonname", cut away "mail:"  #get a mailaddress by "CN -> commonname", cut away "mail:" 
 ldapsearch -LLL -x -D "lunetikk@lunetikk.de" -w "<PASSWORD>" -b "OU=Lunetikk,OU=Verteilergruppen,OU=Ressourcen,OU=Organisation,DC=lunetikk,DC=de" -H "ldap://mydomaincontroller.lunetikk.de" "CN=$USERNAME" mail | sed -n 's/^[ \t]*mail:[ \t]*\(.*\)/\1/p' ldapsearch -LLL -x -D "lunetikk@lunetikk.de" -w "<PASSWORD>" -b "OU=Lunetikk,OU=Verteilergruppen,OU=Ressourcen,OU=Organisation,DC=lunetikk,DC=de" -H "ldap://mydomaincontroller.lunetikk.de" "CN=$USERNAME" mail | sed -n 's/^[ \t]*mail:[ \t]*\(.*\)/\1/p'
- 
  
 #get a displayname and info by "CN"  #get a displayname and info by "CN" 
 ldapsearch -LLL -x -D "lunetikk@lunetikk.de" -w "<PASSWORD>" -b "OU=Lunetikk,OU=Verteilergruppen,OU=Ressourcen,OU=Organisation,DC=lunetikk,DC=de" -H "ldap://mydomaincontroller.lunetikk.de" "CN=$USERNAME" displayName info ldapsearch -LLL -x -D "lunetikk@lunetikk.de" -w "<PASSWORD>" -b "OU=Lunetikk,OU=Verteilergruppen,OU=Ressourcen,OU=Organisation,DC=lunetikk,DC=de" -H "ldap://mydomaincontroller.lunetikk.de" "CN=$USERNAME" displayName info
- 
  
 #get all attributes (?) by "CN"  #get all attributes (?) by "CN" 
Line 24: Line 22:
 echo " " echo " "
 echo " " echo " "
- 
  
 ldapsearch -LLL -x -D "lunetikk@lunetikk.de" -w "<PASSWORD>" -b "OU=Lunetikk,OU=Verteilergruppen,OU=Ressourcen,OU=Organisation,DC=lunetikk,DC=de" -H "ldap://mydomaincontroller.lunetikk.de" '(memberof=cn=lunetikk,dc=lunetikk,dc=de)' ldapsearch -LLL -x -D "lunetikk@lunetikk.de" -w "<PASSWORD>" -b "OU=Lunetikk,OU=Verteilergruppen,OU=Ressourcen,OU=Organisation,DC=lunetikk,DC=de" -H "ldap://mydomaincontroller.lunetikk.de" '(memberof=cn=lunetikk,dc=lunetikk,dc=de)'
linux/scripts/ldap.txt · Last modified: 2017/12/19 09:45 (external edit)