Страница 1 из 1

Проблема с ntlm_auth

Добавлено: 2013-02-01 8:15:48
Sorryxs
Добрый день.
Столкнулся со следующей проблемкой. Пытаюсь сделать сквид ntlm по ад группе авторизация. На centos получилось сделать с ходу, но он убогий (просто стоял под 1с). На фряхе все стоит колом.

Код: Выделить всё

/usr/local/bin/ntlm_auth --helper-protocol=squid-2.5-basic --require-membership-of=S-1-5-21-269939870-1659631336-609245648-1540
На Centos отрабатывает отлично хелпер. ввожу юзера и пасс. OK (путь фряшный). Ввожу на фряхе и пишит ERR. хотя тоже самое.
Оба сервера в AD. Видят wbinfo без проблем.

krb5.conf

Код: Выделить всё

[libdefaults]
        default_realm = ДОМЕН
        clockskew = 300
        v4_instance_resolve = false
        v4_name_convert = {
                host = {
                        rcmd = host
                        ftp = ftp
                }
                plain = {
                        something = something-else
                }
        }

[realms]
        ДОМЕН = {
                kdc = 172.21.1.2
                admin_server = 172.21.1.2
                kpasswd_server = 172.21.1.2

        }
[domain_realm]
        .домен = ДОМЕН
smb.conf

Код: Выделить всё

[global]

   WORKGROUP = KHAB
   server string = squid
   security = ads
   realm = ДОМЕН
   winbind use default domain = no
   winbind uid = 10000-20000
   winbind gid = 10000-20000
   winbind enum users = yes
   winbind enum groups = yes
   winbind separator = /
   log file = /var/log/samba/log.%m
   password server = 172.21.1.2
   realm = khab.drsk.rao-esv.ru
   socket options = TCP_NODELAY
   local master = no
   os level = 0
   domain master = no
   preferred master = no
   domain logons = no
   display charset = koi8-r
;   hosts allow = 192.168.1. 192.168.2. 127.
   load printers = yes
;   printcap name = /etc/printcap
;   printcap name = lpstat
;   printing = cups
;  guest account = pcguest
   log file = /var/log/samba/log.%m
   max log size = 50
;   password server = <NT-Server-Name>
#;   passdb backend = tdbsam
;   include = /usr/local/etc/smb.conf.%m
;   socket options = SO_RCVBUF=8192 SO_SNDBUF=8192
;   interfaces = 192.168.12.2/24 192.168.13.2/24
;   local master = no
;   os level = 33
;   domain master = yes
;   preferred master = yes
;   domain logons = yes
;   logon script = %m.bat
;   logon script = %U.bat
;   logon path = \\%L\Profiles\%U
;   wins support = yes
;   wins server = w.x.y.z
;   wins proxy = yes
   dns proxy = no
;    display charset = koi8-r
;   unix charset = koi8-r
;   dos charset = cp866
;    store dos attributes = yes
;    map hidden = no
;    map system = no
;    map archive = no
;    nt acl support = yes
;    inherit acls = yes
;    map acl inherit = yes
;  add user script = /usr/sbin/useradd %u
;  add group script = /usr/sbin/groupadd %g
;  add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u
;  delete user script = /usr/sbin/userdel %u
;  delete user from group script = /usr/sbin/deluser %u %g
;  delete group script = /usr/sbin/groupdel %g

ipfw открыт полностью и вроде все должно быть ровно. сервер в домене. билет получает легко.

Re: Проблема с ntlm_auth

Добавлено: 2013-02-01 12:51:05
skeletor
А конфиг squid'a?

Re: Проблема с ntlm_auth

Добавлено: 2013-02-04 2:49:41
Sorryxs
[codeauth_param ntlm program /usr/local/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp --require-membership-of="KHAB\net" #net-группа юзверей инета
auth_param ntlm children 100
auth_param ntlm keep_alive on

auth_param basic program /usr/local/bin/ntlm_auth --helper-protocol=squid-2.5-basic --require-membership-of="KHAB\net"
auth_param ntlm children 30
auth_param basic realm Squid proxy-caching web server basic
auth_param basic credentialsttl 2 hours
auth_param basic casesensitive off

acl NET proxy_auth REQUIRED
http_access allow NET

acl manager proto cache_object
acl localhost src 127.0.0.1/32 ::1
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32 ::1

# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
acl localnet src fc00::/7 # RFC 4193 local private network range
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines

acl SSL_ports port 443
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 # https
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT

#
# Recommended minimum Access Permission configuration:
#
# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager

# Deny requests to certain unsafe ports
http_access deny !Safe_ports

# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports
][/code]

Re: Проблема с ntlm_auth

Добавлено: 2013-02-04 3:23:59
Sorryxs
закешировал в самбе
winbnid enum users/groups/separator
перестало светить khab перед группой.
авторизацию проходит через хелпер. все хорошо. Но сам сквид не авторизует...
Пробовал по сиду сделать - все равно не авторизует по группе. без группы тоже.

Re: Проблема с ntlm_auth

Добавлено: 2013-02-05 3:43:09
Sorryxs
проблема решена. поправил самбу и конфиг сквида. траблы с AD2008