From: John M Cooper Date: Fri, 31 Jul 2015 06:16:51 +0000 (-0700) Subject: basic_smb_auth: nmblookup fails when smb.conf contaisn WINS servers X-Git-Tag: merge-candidate-3-v1~12^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=986ea17b79d1cfc9855058842a7d1eb0c3acd1fe;p=thirdparty%2Fsquid.git basic_smb_auth: nmblookup fails when smb.conf contaisn WINS servers From; John M Cooper To; Debian Bug Tracking System Subject; squid: smb_auth does not work with a wins server defined in smb.conf Date; 28 Jan 2002 17:46:13 +0000 If you define a wins server in the file /etc/samba/smb.conf then the smb_auth script gets the wrong Domain Controller IP address. There should be a change to mb_auth.sh at line 50 basically adding in the extra "\..+" stops the number of Wins servers from being returned from the nmblookup command. --- diff --git a/helpers/basic_auth/SMB/basic_smb_auth.sh b/helpers/basic_auth/SMB/basic_smb_auth.sh index f2d6a7d658..a3d035303b 100755 --- a/helpers/basic_auth/SMB/basic_smb_auth.sh +++ b/helpers/basic_auth/SMB/basic_smb_auth.sh @@ -53,7 +53,7 @@ else addropt="" fi echo "Query address options: $addropt" -dcip=`nmblookup $addropt "$PASSTHROUGH#1c" | awk '/^[0-9.]+ / { print $1 ; exit }'` +dcip=`nmblookup $addropt "$PASSTHROUGH#1c" | awk '/^[0-9.]+\..+ / { print $1 ; exit }'` echo "Domain controller IP address: $dcip" [ -n "$dcip" ] || exit 1