[Samba] Filter query

Juan García-Pardo juan.garcia-pardo at filewave.com
Wed Apr 5 12:36:24 UTC 2017

Hi Luca, thank you very much for the tip. I’ve tried to run it with the filter the web page suggests and I got an empty set. I took a look at one of the user objects and I couldn’t see any samAccountType there. 

> On 04 Apr 2017, at 19:54, Luca Olivetti via samba <samba at lists.samba.org> wrote:
> El 04/04/17 a les 16:17, Juan García-Pardo via samba ha escrit:
>> The filter should be “get me the users that are not computers”
> Try this:
> http://www.selfadsi.org/extended-ad/search-user-accounts.htm

In fact I couldn’t see any samAccountType even in the attribute types. The closest thing I saw was a sambaSamAccount, as value of objectClass. Also I couldn’t find any objectCategory attribute.
The web page mentions that one way to get the users would be to use the filter "(&(objectClass=user)(objectCategory=person))”, but that filter returns an empty set. And also by just using “(objectClass=user)” I get the same results.
What I am doing now is retrieving the subschema for the objectClasses and looking for the existence of either user or person, and then using whichever was found for the filter (the same for computer and device).
I might be doing something wrong, can you point me to the mistake?

> Bye
> -- 
> Luca Olivetti
> Wetron Automation Technology http://www.wetron.es/
> Tel. +34 93 5883004 (Ext.3010)  Fax +34 93 5883007
> -- 
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba

Thank you very much,

Juan Garcia

More information about the samba mailing list