stoney core: Global Searches: Difference between revisions
| Line 123: | Line 123: | ||
== Person (People) Search == | == Person (People) Search == | ||
=== Numerical value (integer) People Search === | |||
The following example shows you the numerical value (integer) search (uid search) with '''400''' (400*) as the search parameter and the attributes '''o''' (for the organisation) and '''sstIsActive''' as the return values: | |||
<pre> | |||
ldapsearch -H ldaps://ldapm.tombstone.ch \ | |||
-b "ou=people,dc=foss-cloud,dc=org" \ | |||
-s one \ | |||
-D "cn=Manager,dc=foss-cloud,dc=org" \ | |||
-W -x -LLL \ | |||
"(&(sstBelongsToResellerUID=4000000)(uid=400*))" o sn givenName sstIsActive | |||
</pre> | |||
Do not forget to restrict the search according to the person who is currently logged in. | |||
The result(s): | |||
<pre> | |||
dn: uid=4000002,ou=people,dc=foss-cloud,dc=org | |||
givenName: Michael | |||
sn: Eichenberger | |||
dn: uid=4000064,ou=people,dc=foss-cloud,dc=org | |||
givenName: Christian | |||
sn: Wittkowski | |||
</pre> | |||
=== Alphanumerical value (non-integer) People Search === | |||
The following example shows you the alphanumerical value (non-integer) search with '''mic''' (mic*) as the search parameter and the attributes '''o''' (for the organisation) and '''sstIsActive''' as the return values: | |||
<pre> | |||
ldapsearch -H ldaps://ldapm.tombstone.ch \ | |||
-b "ou=people,dc=foss-cloud,dc=org" \ | |||
-s one \ | |||
-D "cn=Manager,dc=foss-cloud,dc=org" \ | |||
-W -x -LLL \ | |||
"(&(sstBelongsToResellerUID=4000000)(|(o=mic*)(sn=mic*)(givenName=mic*)))" o sn givenName sstIsActive | |||
</pre> | |||
Do not forget to restrict the search according to the person who is currently logged in. | |||
The result(s): | |||
<pre> | |||
dn: uid=4000002,ou=people,dc=foss-cloud,dc=org | |||
givenName: Michael | |||
sn: Eichenberger | |||
</pre> | |||
[[Category:Selfcare]] | [[Category:Selfcare]] | ||
Revision as of 10:26, 28 July 2013
Overview
The main search field in the upper right corner searches the whole directory and gives first results while typing (actual search starts after entering three characters). The following example shows, that after typing four letters, we have four results (each containing the first four letters “Müll”):
- Two customers “Peter Müller” and “Stefan Müller”.
- One reseller “Müller & Co GmbH”.
- One service “Online Backup 10 Gigabyte (Hausi Müller)”.
Search Selection
After the user has entered the first three characters, we do a first search selection:
- Numerical value (integer): Start a search for a uid (unique identifier)
- Alphanumerical value (non-integer): Start a search for either displayName or gecos.
Reseller Search
Numerical value (integer) Reseller Search
The following example shows you the numerical value (integer) search (uid search) with 400 (400*) as the search parameter and the attributes o (for the organisation) and sstIsActive as the return values:
ldapsearch -H ldaps://ldapm.tombstone.ch \ -b "ou=reseller,dc=foss-cloud,dc=org" \ -s one \ -D "cn=Manager,dc=foss-cloud,dc=org" \ -W -x -LLL \ "(&(sstBelongsToResellerUID=4000000)(uid=400*))" o sstIsActive
Do not forget to restrict the search according to the person who is currently logged in.
The result(s):
dn: uid=4000000,ou=reseller,dc=foss-cloud,dc=org o: Reseller Ltd. sstIsActive: TRUE
Legend:
-H: ldapuri
Specify URI(s) referring to the ldap server(s).
-b: searchbase
Use searchbase as the starting point for the search instead of
the default.
-s: base|one|sub
Specify the scope of the search to be one of base, one, or sub
to specify a base object, one-level, or subtree search. The
default is sub.
-D: binddn
Use the Distinguished Name binddn to bind to the LDAP directory.
-W: Prompt for simple authentication. This is used instead of spec-
ifying the password on the command line.
-x: Use simple authentication instead of SASL.
-LLL: Search results are display in LDAP Data Interchange Format
detailed in ldif(5). A single -L restricts the output to
LDIFv1. A second -L disables comments. A third -L disables
printing of the LDIF version. The default is to use an extended
version of LDIF.
Alphanumerical value (non-integer) Reseller Search
The following example shows you the alphanumerical value (non-integer) search with res (res*) as the search parameter and the attributes o (for the organisation) and sstIsActive as the return values:
ldapsearch -H ldaps://ldapm.tombstone.ch \ -b "ou=reseller,dc=foss-cloud,dc=org" \ -s one \ -D "cn=Manager,dc=foss-cloud,dc=org" \ -W -x -LLL \ "(&(sstBelongsToResellerUID=4000000)(o=res*))" o sstIsActive
Do not forget to restrict the search according to the person who is currently logged in.
The result(s):
dn: uid=4000000,ou=reseller,dc=foss-cloud,dc=org o: Reseller Ltd. sstIsActive: TRUE
Customer Search
The customer search is a bit different than the reseller search, because we can have company and private customers.
Numerical value (integer) Customer Search
The following example shows you the numerical value (integer) search (uid search) with 400 (400*) as the search parameter and the attributes o (for the organisation) and sstIsActive as the return values:
ldapsearch -H ldaps://ldapm.tombstone.ch \ -b "ou=customers,dc=foss-cloud,dc=org" \ -s one \ -D "cn=Manager,dc=foss-cloud,dc=org" \ -W -x -LLL \ "(&(sstBelongsToResellerUID=4000000)(uid=400*))" o sn givenName sstIsActive
Do not forget to restrict the search according to the person who is currently logged in.
The result(s):
dn: uid=4000001,ou=customers,dc=foss-cloud,dc=org o: Customer Ltd. sstIsActive: TRUE
Alphanumerical value (non-integer) Customer Search
The following example shows you the alphanumerical value (non-integer) search with cus (cus*) as the search parameter and the attributes o (for the organisation) and sstIsActive as the return values:
ldapsearch -H ldaps://ldapm.tombstone.ch \ -b "ou=customers,dc=foss-cloud,dc=org" \ -s one \ -D "cn=Manager,dc=foss-cloud,dc=org" \ -W -x -LLL \ "(&(sstBelongsToResellerUID=4000000)(|(o=cus*)(sn=cus*)(givenName=cus*)))" o sn givenName sstIsActive
Do not forget to restrict the search according to the person who is currently logged in.
The result(s):
dn: uid=4000001,ou=customers,dc=foss-cloud,dc=org o: Customer Ltd. sstIsActive: TRUE dn: uid=5000001,ou=customers,dc=foss-cloud,dc=org givenName: Name sstIsActive: TRUE sn: Customer
Person (People) Search
Numerical value (integer) People Search
The following example shows you the numerical value (integer) search (uid search) with 400 (400*) as the search parameter and the attributes o (for the organisation) and sstIsActive as the return values:
ldapsearch -H ldaps://ldapm.tombstone.ch \ -b "ou=people,dc=foss-cloud,dc=org" \ -s one \ -D "cn=Manager,dc=foss-cloud,dc=org" \ -W -x -LLL \ "(&(sstBelongsToResellerUID=4000000)(uid=400*))" o sn givenName sstIsActive
Do not forget to restrict the search according to the person who is currently logged in.
The result(s):
dn: uid=4000002,ou=people,dc=foss-cloud,dc=org givenName: Michael sn: Eichenberger dn: uid=4000064,ou=people,dc=foss-cloud,dc=org givenName: Christian sn: Wittkowski
Alphanumerical value (non-integer) People Search
The following example shows you the alphanumerical value (non-integer) search with mic (mic*) as the search parameter and the attributes o (for the organisation) and sstIsActive as the return values:
ldapsearch -H ldaps://ldapm.tombstone.ch \ -b "ou=people,dc=foss-cloud,dc=org" \ -s one \ -D "cn=Manager,dc=foss-cloud,dc=org" \ -W -x -LLL \ "(&(sstBelongsToResellerUID=4000000)(|(o=mic*)(sn=mic*)(givenName=mic*)))" o sn givenName sstIsActive
Do not forget to restrict the search according to the person who is currently logged in.
The result(s):
dn: uid=4000002,ou=people,dc=foss-cloud,dc=org givenName: Michael sn: Eichenberger