[Samba] ldap search with DN which contains space

Stefan Kania stefan at kania-online.de
Sun Nov 6 09:47:10 UTC 2016


Like you allways do it on th shell, use quots:
ldbsearch -H /var/lib/samba/private/sam.ldb "memberOf=CN=Domain
Controllers,CN=Users,DC=ejemplo,DC=cu"
or:
ldbsearch -H /var/lib/samba/private/sam.ldb 'memberOf=CN=Domain
Controllers,CN=Users,DC=ejemplo,DC=cu'
Am 06.11.16 um 04:37 schrieb Felipe_G0NZÁLEZ_SANTIAG0 via samba:
> Hello, I am trying to get all the members of a given group. 
> I run this command: 
> #ldbsearch -H /var/lib/samba/private/sam.ldb memberOf=CN=Administrators,CN=Builtin,DC=ejemplo,DC=cu 
> And it works fine. 
> 
> BUT: problems arise when the group name contains spaces, e.g 'Domain Controllers' 
> Then, I run: 
> #ldbsearch -H /var/lib/samba/private/sam.ldb memberOf=CN=Domain Controllers,CN=Users,DC=ejemplo,DC=cu 
> And this return no records. 
> Even using 'DN' or "DN" the < no records> behaviour persists. 
> 
> So, How can I get the members of a group which contains spaces in its name by using ldbsearch? Or other alternative? 
> 
> Regards. 
> ___________________________________________ 
> Felipe_ González_Santiago 
> Universidad_de_las_Ciencias_Informáticas 
> Centro_de_Software_Libre 
> La_Habana. CUBA 
> 
> "Remind yourself that you cannot fail at being yourself" 
> Wayne Dyer 
> 


-- 
Stefan Kania
Landweg 13
25693 St. Michaelisdonn


Signieren jeder E-Mail hilft Spam zu reduzieren. Signieren Sie ihre
E-Mail. Weiter Informationen unter http://www.gnupg.org

Mein Schlüssel liegt auf

hkp://subkeys.pgp.net


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba/attachments/20161106/4218603b/signature.sig>


More information about the samba mailing list