LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   LDAP syntax : shorter notation (https://www.linuxquestions.org/questions/linux-newbie-8/ldap-syntax-shorter-notation-904014/)

jonaskellens 09-20-2011 09:08 AM

LDAP syntax : shorter notation
 
Hello,

I want to write the following shorter :

access to dn="ou=book1,ou=contacts,ou=110011,dc=webonline" attrs=children
by group.exact="cn=admins,ou=110011,dc=webonline" write
by * none break
access to dn="ou=book2,ou=contacts,ou=110011,dc=webonline" attrs=children
by group.exact="cn=admins,ou=110011,dc=webonline" write
by * none break
access to dn="ou=book3,ou=contacts,ou=110011,dc=webonline" attrs=children
by group.exact="cn=admins,ou=110011,dc=webonline" write
by * none break

acid_kewpie 09-21-2011 02:12 AM

can i suggest in what way you want to make it shorter? actually describing a problem is kinda useful. and a please / thank you never hurts either. assuming this is OpenLDAP (is it??) then try a dn.regex: http://www.openldap.org/doc/admin24/access-control.html

jonaskellens 09-21-2011 04:12 AM

Yes this is openLDAP.

You see that I have several OU's beneath ou=contacts,ou=110011,dc=webonline :
- book1
- book2
- book3
- bookX

In stead of repeating the same line every time :

access to dn="ou=bookX,ou=contacts,ou=110011,dc=webonline" attrs=children
by group.exact="cn=admins,ou=110011,dc=webonline" write
by * none break

is there a possibility to write this shorter ?

Thank you for responding.

acid_kewpie 09-21-2011 04:14 AM

as above, look at a dn.regex.

jonaskellens 09-21-2011 04:44 AM

Something like :

access to dn.regex="ou=book[123],ou=contacts,ou=110011,dc=webonline" attrs=children

I don't see where <pattern> is explained ? Or are these regular expressions the same as in PHP ?

acid_kewpie 09-21-2011 04:50 AM

a regular expression is a standard across all implementations. Unless they are done wrong.

chrism01 09-21-2011 06:40 PM

Umm, actually there are lang & tool specific variations http://regex.info/


All times are GMT -5. The time now is 11:06 PM.