[Samba] wbinfo_group.pl and spaces in group names

Neil Price nprice at gibb.co.za
Fri Aug 27 02:54:28 MDT 2010

  Hi, I;m using wbinfo_group.pl from samba 3.4.8 for squid ntlm 
authentication because I'm using multiple samba groups

squid version is 2.7 from debian Lenny

squid.conf contains:

external_acl_type nt_group ttl=0 children=5 %LOGIN 
/usr/lib/squid/wbinfo_group.pl -d
acl AuthorizedUsers proxy_auth REQUIRED
acl internet external nt_group "/etc/squid/allowed-groups"
http_access deny !internet

Allowed groups contains


This tests fine from command line
echo "lawco\\nprice 
lawco\\Internet%20users"|/usr/lib/squid/wbinfo_group.pl -d

But from squid it does not work, it seems that squid escapes the escape.

I changed  wbinfo_group.pl

         foreach $group (@groups) {
                 $group =~ s/%([0-9a-fA-F][0-9a-fA-F])/pack("c",hex($1))/eg;
                 #this next line added by me
                 $group =~ s/%20/ /;
                 $ans = &check($user, $group);
                 last if $ans eq "OK";

Probably horrify perl purists but it works for me. Hope this helps someone.

More information about the samba mailing list