squid + ad+samba+winbind

I am trying to configure the proxy for single sign on.only the users in the internet group will have direct access to the internet but other have to provide the user id and password to get an internet access.

The squid.conf configuration
auth_param basic program /usr/bin/ntlm_auth --helper-protocol=squid-2.5-basic
         auth_param basic children 15
         auth_param basic realm squid proxy-caching web server
         auth_param ntlm keep_alive on
acl AuthorizedUsers proxy_auth REQUIRED
#external_acl_type ADS %LOGIN /usr/sbin/wbinfo_group.pl
external_acl_type nt_group %LOGIN /usr/sbin/wbinfo_group.pl
acl dpto external nt_group Holding Internet Users
http_access allow dpto
http_access allow AuthorizedUsers
I am getting this error in /var/log/messages

 fetch_ldap_pw: neither ldap secret retrieved!
Sep  2 14:41:30 proxy-server smbd[5751]: [2013/09/02 14:41:30.814622,  0] lib/smbldap.c:1180(smbldap_connect_system)
Sep  2 14:41:30 proxy-server smbd[5751]:   ldap_connect_system: Failed to retrieve password from secrets.tdb
I can verify the wbinfo -u and wbinfo -g and wbinfo -t all is good.please help
kastro AbbasiIT consultantAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


you can try this method if your ldap configuration is correct and all services and domain are working perfectly

Squid Authentication with Domain User

=>Edit squid.conf file
#vim /etc/squid/squid.conf

http_port 8080

auth_param basic program /usr/lib/squid/squid_ldap_auth -d -b "vd=domain.in,o=domain,dc=domain,dc=in" -f "(&(uid=%s))" 192.168.X.X
auth_param basic children 5
auth_param basic realm web-proxy
auth_param basic credentialsttl 1 minutes
auth_param basic casesensitive off

acl ldapauth proxy_auth REQUIRED

http_access allow ldapauth

save this file

=>Start the service
# /etc/init.d/squid restart
#chkconfig squid on

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kastro AbbasiIT consultantAuthor Commented:
I make these changes in squid.conf and now i am getting a login prompt but this prompt did not accept the user id and passwd.

auth_param basic program /usr/sbin/squid_ldap_auth -d -b "vd=holdin.loc,o=holding,dc=loc" -f "(&(uid=%s))"
auth_param basic children 5
auth_param basic realm web-proxy
auth_param basic credentialsttl 1 minutes
auth_param basic casesensitive off

i have attached the samba and squid configuration files.
i have a one group on Active directory for internet users "Internet Users".
Please help me i am strucked from last many days
First you should be using --helper-protocol=squid-2.5-ntlmssp

The other issue is whether you pushed via GPO that NTLM should be used and trusted by the LAN browsers.
Comment out the realm and the keepalive directives for basic.

What guide are you following to set this up.
There is a test for ntlm_auth to make sure it returns a valid response.
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

kastro AbbasiIT consultantAuthor Commented:
i have checked the ntlm_auth it is working fine with AD users. and squid is working fine for all the users either they are on domain or workgroup.
what should i do if i want
log in prompt only for the users who are not on domain when they try to access the internet through proxy.
Did you configure samba/winbind to default to use AD domain or not.

the setup you have is fine, the difficulty might be what they enter at the login prompt.
i.e. domain+username
or username

If you set the use domain true, then username/password will be validated based on the configuration within /etc/nsswitch.conf.

Your  /usr/sbin/wbinfo_group.pl is ldap based, is that working correctly.  The other issue deals with when squid runs this script, it does not have the rights to external files where you may have stored the credentials that the script uses to authenticate to the LDAP server. or your LDAP server does not allow anonymous queries and the squid  user is not authorized to access it.
kastro AbbasiIT consultantAuthor Commented:
Thanx for the reply.............
when i execute the wbinfo_group.pl script with the user name "abc" which is in the internet group on active diarectory i found the following errors

failed to call wbcLookupName: WBC_ERR_DOMAIN_NOT_FOUND
Could not lookup name Holding
failed to call wbcStringToSid: WBC_ERR_INVALID_PARAM
Could not convert sid  to gid
User:  -abc-
Group: -xxxx
SID:   --
GID:   --
failed to call wbcGetGroups: WBC_ERR_DOMAIN_NOT_FOUND
Could not get groups for user abc
Sending OK to squid
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.