[389-devel] Re: Groups are not accessible by filter

2019-05-09 Thread William Brown
> On 9 May 2019, at 14:52, Anuj Borah wrote: > > @William Brown > > Its not relevant to this subject line , but its related to lib389 . > > Question : Does get_attrs_vals_utf8 and all get_attrs_vals types should case > sensitive ?? > > Look at bellow result: > > with search_s: > >

[389-devel] Re: Groups are not accessible by filter

2019-05-08 Thread Anuj Borah
@William Brown Its not relevant to this subject line , but its related to lib389 . Question : Does get_attrs_vals_utf8 and all get_attrs_vals types should case sensitive ?? Look at bellow result: with search_s: (Pdb) topo.standalone.search_s(DEFAULT_SUFFIX, ldap.SCOPE_SUBTREE, F4, ['cn',

[389-devel] Re: Groups are not accessible by filter

2019-05-08 Thread Anuj Borah
@William Brown Thank you for the clarification. Regards Anuj Borah On Thu, May 9, 2019 at 8:57 AM William Brown wrote: > > > > On 9 May 2019, at 12:47, Anuj Borah wrote: > > > > @William Brown > > > > I am attaching the main script where i am facing the problem . > > > > F4 gives me the

[389-devel] Re: Groups are not accessible by filter

2019-05-08 Thread Anuj Borah
@William Brown I am attaching the main script where i am facing the problem . F4 gives me the following : With search_s: (Pdb) topo.standalone.search_s(DEFAULT_SUFFIX, ldap.SCOPE_SUBTREE, F4) [dn: uid=bhall,ou=People,dc=example,dc=com cn: Benjamin Hall gidNumber: 2000 givenName: Benjamin

[389-devel] Re: Groups are not accessible by filter

2019-05-07 Thread William Brown
> On 7 May 2019, at 22:35, Ludwig Krispenz wrote: > > > On 05/07/2019 02:08 PM, William Brown wrote: >> >>> On 7 May 2019, at 22:03, Viktor Ashirov wrote: >>> >>> On Mon, Apr 29, 2019 at 6:48 AM William Brown wrote: > On 29 Apr 2019, at 12:33, Anuj Borah wrote: >

[389-devel] Re: Groups are not accessible by filter

2019-05-07 Thread William Brown
> On 7 May 2019, at 23:56, Viktor Ashirov wrote: > > On Tue, May 7, 2019 at 2:09 PM William Brown wrote: >> >> >> >>> On 7 May 2019, at 22:03, Viktor Ashirov wrote: >>> >>> On Mon, Apr 29, 2019 at 6:48 AM William Brown wrote: > On 29 Apr 2019, at 12:33, Anuj Borah

[389-devel] Re: Groups are not accessible by filter

2019-05-07 Thread Viktor Ashirov
On Tue, May 7, 2019 at 2:09 PM William Brown wrote: > > > > > On 7 May 2019, at 22:03, Viktor Ashirov wrote: > > > > On Mon, Apr 29, 2019 at 6:48 AM William Brown wrote: > >> > >> > >> > >>> On 29 Apr 2019, at 12:33, Anuj Borah wrote: > >>> > >>> @William Brown > >>> > >>> Thanks for the tip!

[389-devel] Re: Groups are not accessible by filter

2019-05-07 Thread Ludwig Krispenz
On 05/07/2019 02:08 PM, William Brown wrote: On 7 May 2019, at 22:03, Viktor Ashirov wrote: On Mon, Apr 29, 2019 at 6:48 AM William Brown wrote: On 29 Apr 2019, at 12:33, Anuj Borah wrote: @William Brown Thanks for the tip! (Pdb) len(topo.standalone.search_s(DEFAULT_SUFFIX,

[389-devel] Re: Groups are not accessible by filter

2019-05-07 Thread William Brown
> On 7 May 2019, at 22:03, Viktor Ashirov wrote: > > On Mon, Apr 29, 2019 at 6:48 AM William Brown wrote: >> >> >> >>> On 29 Apr 2019, at 12:33, Anuj Borah wrote: >>> >>> @William Brown >>> >>> Thanks for the tip! >>> >>> (Pdb) len(topo.standalone.search_s(DEFAULT_SUFFIX, >>>

[389-devel] Re: Groups are not accessible by filter

2019-05-07 Thread Viktor Ashirov
On Mon, Apr 29, 2019 at 6:48 AM William Brown wrote: > > > > > On 29 Apr 2019, at 12:33, Anuj Borah wrote: > > > > @William Brown > > > > Thanks for the tip! > > > > (Pdb) len(topo.standalone.search_s(DEFAULT_SUFFIX, > >

[389-devel] Re: Groups are not accessible by filter

2019-05-06 Thread Anuj Borah
Ok, I will check. Thanks On Tue, May 7, 2019 at 8:21 AM William Brown wrote: > > > On 7 May 2019, at 11:31, Anuj Borah wrote: > > > > @William Brown > > > > Actually my concern was as bellow: > > > > topo.standalone.search_s(DEFAULT_SUFFIX, ldap.SCOPE_SUBTREE, F4, ['cn', > 'cn', 'cn']) > >

[389-devel] Re: Groups are not accessible by filter

2019-05-06 Thread William Brown
> On 7 May 2019, at 11:31, Anuj Borah wrote: > > @William Brown > > Actually my concern was as bellow: > > topo.standalone.search_s(DEFAULT_SUFFIX, ldap.SCOPE_SUBTREE, F4, ['cn', 'cn', > 'cn']) > >>[dn: uid=bhall,ou=People,dc=example,dc=com > cn: Benjamin Hall > > ] > > Question: Can we

[389-devel] Re: Groups are not accessible by filter

2019-05-06 Thread Anuj Borah
@William Brown Actually my concern was as bellow: topo.standalone.search_s(DEFAULT_SUFFIX, ldap.SCOPE_SUBTREE, F4, ['cn', 'cn', 'cn']) >>[dn: uid=bhall,ou=People,dc=example,dc=com cn: Benjamin Hall ] Question: Can we use these filter directly in filter module. --->> like

[389-devel] Re: Groups are not accessible by filter

2019-05-06 Thread William Brown
You are missing a key part of the question again: "Is there any chance we can use these filters TO GET lib389 objects of the type X". So for example: > On 3 May 2019, at 17:12, Anuj Borah wrote: > > @William Brown > > Are there any chance we can use these filter with filter module directly .

[389-devel] Re: Groups are not accessible by filter

2019-05-03 Thread Anuj Borah
@William Brown Are there any chance we can use these filter with filter module directly . F1 = "(sn=Hall)" F2 = "(nsRoleDN=cn=new managed role)" F3 = "(l=sunnyvale)" F4 = "(& (| {} {}) {})".format(F2, F1, F3) F10 = "(& {} {})".format(F6, F9) topo.standalone.search_s(DEFAULT_SUFFIX,

[389-devel] Re: Groups are not accessible by filter

2019-04-29 Thread Anuj Borah
Yes, it is. On Mon, Apr 29, 2019 at 11:17 AM William Brown wrote: > > > > On 29 Apr 2019, at 15:00, Anuj Borah wrote: > > > > @William Brown > > > > Sorry my bad , syntax was wrong . > > > > (Pdb) len(Accounts(topo.standalone, >

[389-devel] Re: Groups are not accessible by filter

2019-04-28 Thread William Brown
> On 29 Apr 2019, at 15:00, Anuj Borah wrote: > > @William Brown > > Sorry my bad , syntax was wrong . > > (Pdb) len(Accounts(topo.standalone, > DEFAULT_SUFFIX).filter("(testUserAccountControl:1.2.840.113556.1.4.803:=8388608, > ['attrlist=cn:sn:uid:testUserAccountControl'])")) > 6 > >

[389-devel] Re: Groups are not accessible by filter

2019-04-28 Thread Anuj Borah
@William Brown Sorry my bad , syntax was wrong . (Pdb) len(Accounts(topo.standalone, DEFAULT_SUFFIX).filter("(testUserAccountControl:1.2.840.113556.1.4.803:=8388608, ['attrlist=cn:sn:uid:testUserAccountControl'])")) 6 Thanks . On Mon, Apr 29, 2019 at 10:26 AM Anuj Borah wrote: > @William

[389-devel] Re: Groups are not accessible by filter

2019-04-28 Thread Anuj Borah
@William Brown This is the filter : "testUserAccountControl:1.2.840.113556.1.4.803:=8388608", ['attrlist=cn:sn:uid:testUserAccountControl'] len(topo.standalone.search_s(DEFAULT_SUFFIX, ldap.SCOPE_SUBTREE,"testUserAccountControl:1.2.840.113556.1.4.803:=8388608",

[389-devel] Re: Groups are not accessible by filter

2019-04-28 Thread William Brown
> On 29 Apr 2019, at 12:33, Anuj Borah wrote: > > @William Brown > > Thanks for the tip! > > (Pdb) len(topo.standalone.search_s(DEFAULT_SUFFIX, > ldap.SCOPE_SUBTREE,"testUserAccountControl:1.2.840.113556.1.4.803:=8388608", > ['attrlist=cn:sn:uid:testUserAccountControl'])) > 6 > (Pdb)

[389-devel] Re: Groups are not accessible by filter

2019-04-28 Thread Anuj Borah
@William Brown Thanks for the tip! (Pdb) len(topo.standalone.search_s(DEFAULT_SUFFIX, ldap.SCOPE_SUBTREE,"testUserAccountControl:1.2.840.113556.1.4.803:=8388608", ['attrlist=cn:sn:uid:testUserAccountControl'])) 6 (Pdb) len(Accounts(topo.standalone,

[389-devel] Re: Groups are not accessible by filter

2019-04-28 Thread William Brown
> On 29 Apr 2019, at 12:15, Anuj Borah wrote: > > @William Brown > > Thank you for the clarification. Same thing was writing in the second mail of > this mail chain . I was missing the use case UniqueGroup(…).filter(). > > What about bellow filters . Can we use filter here also . > >

[389-devel] Re: Groups are not accessible by filter

2019-04-28 Thread Anuj Borah
@William Brown Thank you for the clarification. Same thing was writing in the second mail of this mail chain . I was missing the use case UniqueGroup(…).filter(). What about bellow filters . Can we use filter here also . topo.standalone.search_s(DEFAULT_SUFFIX, ldap.SCOPE_SUBTREE, '(& (|

[389-devel] Re: Groups are not accessible by filter

2019-04-28 Thread William Brown
> On 29 Apr 2019, at 11:53, Anuj Borah wrote: > > @William Brown > > The space did not make any difference . Look at bellow result . > > (Pdb) i > '(uniquemember=uid=kvaughan,ou=People,dc=example,dc=com)' > (Pdb) Accounts(topo.standalone, DEFAULT_SUFFIX).filter(i) ^ Because you are using

[389-devel] Re: Groups are not accessible by filter

2019-04-28 Thread Anuj Borah
@William Brown The space did not make any difference . Look at bellow result . (Pdb) i '(uniquemember=uid=kvaughan,ou=People,dc=example,dc=com)' (Pdb) Accounts(topo.standalone, DEFAULT_SUFFIX).filter(i) [] (Pdb) topo.standalone.search_s(DEFAULT_SUFFIX, ldap.SCOPE_SUBTREE, i) [dn: cn=Accounting

[389-devel] Re: Groups are not accessible by filter

2019-04-28 Thread William Brown
> On 26 Apr 2019, at 01:56, Anuj Borah wrote: > > @Ludwig > > Under the same condition . > > Accounts(topo.standalone, DEFAULT_SUFFIX).filter('(uniquemember=uid=kvaughan, > ou=People, dc=example,dc=com)') >>> gives 0 result . (From filter > script) > > > (Pdb)

[389-devel] Re: Groups are not accessible by filter

2019-04-25 Thread Anuj Borah
@Ludwig Under the same condition . Accounts(topo.standalone, DEFAULT_SUFFIX).filter('(uniquemember=uid=kvaughan, ou=People, dc=example,dc=com)') >>> gives 0 result . (From filter script) (Pdb) topo.standalone.search_s(DEFAULT_SUFFIX, ldap.SCOPE_SUBTREE,

[389-devel] Re: Groups are not accessible by filter

2019-04-25 Thread Ludwig
On 04/25/2019 05:38 PM, Anuj Borah wrote: @Ludwig Try running these Two scrips one is with filter and other is with search_s. I will then also get different results, but you need to clarify what is "correct" and what not, if it is in what is sent to the server or

[389-devel] Re: Groups are not accessible by filter

2019-04-25 Thread Anuj Borah
@Ludwig Try running these Two scrips one is with filter and other is with search_s. Problem is with search_s i am getting correct result , where with filter wrong result. Regards Anuj Borah On Thu, Apr 25, 2019 at 8:30 PM Ludwig wrote: > what is your problem ? the searches in both access

[389-devel] Re: Groups are not accessible by filter

2019-04-25 Thread Ludwig
what is your problem ? the searches in both access logs produce the same results: grep nentries /tmp/access_with* | grep tag=101 /tmp/access_with_filter:[25/Apr/2019:08:36:36.560467098 +] conn=1 op=148 RESULT err=0 tag=101 nentries=3 etime=0.399837

[389-devel] Re: Groups are not accessible by filter

2019-04-25 Thread Anuj Borah
@Ludwig Attached the logs . I have noticed , it happening due to _get_objectclass_filter() method in filter of DSLdapObjects . Accounts(topo.standalone, DEFAULT_SUFFIX)._objectclasses ['nsAccount', 'nsPerson', 'simpleSecurityObject', 'organization', 'person', 'account', 'organizationalUnit',

[389-devel] Re: Groups are not accessible by filter

2019-04-25 Thread Ludwig
can you provide the access logs to show what searches were really done On 04/24/2019 12:23 PM, Anuj Borah wrote: Hi all, Please consider bellow condition . UserAccount(topo.standalone, 'cn=Accounting Managers,ou=groups,dc=example,dc=com').add('uniquemember', [ 'uid=scarter, ou=People,