Me ajudem ae...

Cleber, Maycom e cia.

Em um Debian 4.0 com squid3 e Samba 3.0.24, configurado e autenticando
por ncsa_auth sem problemas. Estou tentando mudar para autenticar em um
Samba 3.0.22-13.16 no SUSE-SLES10, eu baixei aquela versão do
smb_auth (smb_auth-0.05 de 1999) compilei e instalei, reinstalei(e
até fiz uma alteração no smb_auth.sh), já fiz de tudo, mas o
mesmo erro quando eu rodo o comando smb_auth -W DOMAIN -d ainda
persiste. Também alterei a variável SAMBAPREFIX(como dito pelo
Cleber).

Resultado do comando smb_auth:

9P44BG1:/usr/bin# smb_auth -W PMCCDC003 -d
a a
Domain name: PMCCDC003
Pass-through authentication: no
Query address options:
Domain controller IP address: 192.168.27.5
Domain controller NETBIOS name: PMCCDC003
Contents of //PMCCDC003/NETLOGON/proxyauth:
ERR

------------------------------------------------------------------------\
--------



Arquivo smb_auth.sh:

export SAMBAPREFIX=/usr
read DOMAINNAME
read PASSTHROUGH
read NMBADDR
read NMBCAST
read AUTHSHARE
read AUTHFILE
read SMBUSER
read SMBPASS

# Find domain controller
echo "Domain name: $DOMAINNAME"
if [ -n "$PASSTHROUGH" ]
then
   echo "Pass-through authentication: yes: $PASSTHROUGH"
else
   echo "Pass-through authentication: no"
   PASSTHROUGH="$DOMAINNAME"
fi
if [ -n "$NMBADDR" ]
then
   if [ "$NMBCAST" = "1" ]
   then
     addropt="-U $NMBADDR -R"
   else
     addropt="-B $NMBADDR"
   fi
else
   addropt=""
fi
echo "Query address options: $addropt"
dcip=`$SAMBAPREFIX/bin/nmblookup $addropt "$PASSTHROUGH" | awk
'/^[0-9.]+/ { print $1 ; exit }'`
echo "Domain controller IP address: $dcip"
[ -n "$dcip" ] || exit 1

# All right, we have the IP address of a domain controller,
# but we need its name too
dcname=`$SAMBAPREFIX/bin/nmblookup -A $dcip | awk '$2 == "<1e>" { print
$1 ; exit }'`
echo "Domain controller NETBIOS name: $dcname"
[ -n "$dcname" ] || exit 1

# Pass password to smbclient through environment. Not really safe.
USER="$SMBUSER%$SMBPASS"
export USER

# Read the contents of the file $AUTHFILE on the $AUTHSHARE share
authfilebs=`echo "$AUTHFILE" | tr / '\\\\'`
authinfo=`$SAMBAPREFIX/bin/smbclient "//$dcname/$AUTHSHARE/AUTHFILE" -I
$dcip -d 0 -E -W "$DOMAINNAME" -c "get proxyauth" 2>/dev/null`
echo "Contents of //$dcname/$AUTHSHARE/$AUTHFILE: $authinfo"

# Allow for both \n and \r\n end-of-line termination
[ "$authinfo" = "allow" -o "$authinfo" = "allow" ] || exit 1
exit 0


Me ajudem ae...

Obrigado
--

Guilherme Cruz


Responder a