titux
Goto Top

Samba mit ADS Server 2008 und Windows 7

Servus,

habe hier Debian Lenny am laufen und Samba über aptitude ganz normal installiert. Die Samba Version lautet: 2:3.2.5-4lenny11

Es gibt einen Windows Server 2008R2 mit einem funktionierendem Active Directory, der die Benutzerverwaltung übernehmen soll.
Über Kerberos und Winbind habe ich den Samba Server zum Domänenmitglied gemacht. Ein wbinfo -u und wbinfo -g funktioniert auch tadellos.

Bis jetzt habe ich eine Freigabe auf dem Samba eingerichtet. Dies funktioniert unter einem Windows XP auch problemlos, (der Windows XP Rechner ist noch
kein Domänenmitglied), die Anmeldemaske erscheint und ich kann mich über Domäne\Benutzername erfolgreich mit der Samba Freigabe verbinden.
Das ganze soll jetzt aber auch mit einem Windows 7 funktionieren und hier klappt es nicht. Es kommt immer die Fehlermeldung zurück, dass der Benutzer/Kennwort
falsch wäre. Kann es sein, dass hierfür einfach die Samba Version zu alt ist? Oder liegt es eher an meiner Kerberos Konfiguration? Zum besseren Verständis ein paar
Infos und die Configs.

Domänenname: homebase.local
DC Netbios Name: hom-srv-ads-001 (192.168.100.10)
Samba Server: hom-srv-fil-001 (192.168.100.50)

Die DNS Auflösung funktioniert in beiden Richtungen, die Namen werden vollqualifiziert aufgelöst.


/etc/krb5.conf
[libdefaults]

        ticket_lifetime = 24000
        clock_skew = 300
        default_realm = HOMEBASE.LOCAL

        default_tgs_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5
        default_tkt_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5
        permitted_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5
        forwardable = yes

        krb4_config = /etc/krb.conf
        krb4_realms = /etc/krb.realms
        kdc_timesync = 1
        ccache_type = 4
        forwardable = true
        proxiable = true

        v4_instance_resolve = false
        v4_name_convert = {
        host = {
        rcmd = host
        ftp = ftp
        }
        plain = {
        something = something-else
        }
        }
        fcc-mit-ticketflags = true

[realms]

        HOMEBASE.LOCAL = {
                kdc = hom-srv-ads-001.homebase.local
                admin_server = hom-srv-ads-001.homebase.local
        }

[domain_realm]

        .homebase.local = HOMEBASE.LOCAL
        homebase.local = HOMEBASE.LOCAL

[login]

        krb4_convert = true
        krb4_get_tickets = false

[logging]

        default = FILE:/var/log/krb5.log

[appdefaults]

        pam = {
        debug = false
        ticket_lifetime = 36000
        renew_lifetime = 36000
        forwardable = true
        krb4_convert = false
        }

/etc/samba/smb.conf

[global]

  security = ads
  realm = HOMEBASE.LOCAL
  password server = 192.168.100.10     #IP des Domain Controllers
  workgroup = HOMEBASE
  idmap uid = 10000-20000
  idmap gid = 10000-20000
  winbind enum users = yes
  winbind enum groups = yes
  winbind cache time = 10
  winbind use default domain = yes
  winbind separator = +
  template homedir = /home/%U
  template shell = /bin/bash
  client use spnego = yes
  client ntlmv2 auth = yes
  encrypt passwords = yes
  restrict anonymous = 2
  domain master = no
  local master = no
  preferred master = no
  os level = 0
  server string = %h server
  log file = /var/log/samba/log.%m
  max log size = 1000
  syslog = 0
  panic action = /usr/share/samba/panic-action %d
  obey pam restrictions = yes
#  passdb backend = tdbsam


  [Share]

  comment = Share Daten
  path = /share
  valid users = @HOMEBASE+ntfs_share
  writeable = yes
  browseable = yes
  force directory mode = 775
  force group = ntfs_share

/etc/nsswitch.conf

passwd: compat winbind
group: compat winbind
shadow: compat


Im Logfile von Samba finde ich den folgenden Eintrag, wenn ich versuche, von meinem Windows 7 Client drauf zuzugreifen:

[2010/10/26 22:06:01,  0] lib/util_sock.c:read_socket_with_timeout(939)
[2010/10/26 22:06:01,  0] lib/util_sock.c:get_peer_addr_internal(1676)
  getpeername failed. Error was Der Socket ist nicht verbunden
  read_socket_with_timeout: client 0.0.0.0 read error = Die Verbindung wurde vom Kommunikationspartner zurückgesetzt.

An der Stelle komme ich nicht weiter. Die Zeit ist auf beiden Server per NTP eingerichtet, dass habe ich auch überprüft.

Gruß
TiTux

Content-Key: 153920

Url: https://administrator.de/contentid/153920

Printed on: April 24, 2024 at 21:04 o'clock

Member: Marco-83
Marco-83 Oct 27, 2010 at 16:27:52 (UTC)
Goto Top
Hi,

vielleicht nur als kleine Gedanken Anstosß ! Hatte neulich ein ähnliches Problem ! Kopiere Dir mal den Foren Eintrag der mir damals geholfen hat...

Do the following....

1) Add the workstation to the domain

2) Make the following changes to your Local Security Policy:
Local Security Policy (start | secpol.msc) | Local Policies | Security Options
Domain member: Digitally encrypt or sign secure channel data (always) - Disabled
Network security: LAN Manager authentication level - Send LM & NTLM - use NTLMv2 session security if negotiated

3) Have the workstation join the domain.

Ergänzung Lan Manager authentication Level:

HKLM\SYSTEM\CurrentControlSet\Control\Lsa
den Schlüssel:
LmCompatibilityLevel
vom Typ DWORD anlegen. Als Wert hier entweder "2" oder wenn es damit auch noch nicht geht "1" angeben. Default ist bei Win 7 wohl "3". Die Bedeutung der Werte ist folgende:


Clients use LM and NTLM authentication, but they never use NTLMv2 session security. Domain controllers accept LM, NTLM, and NTLMv2 authentication.

1
Clients use LM and NTLM authentication, and they use NTLMv2 session security if the server supports it. Domain controllers accept LM, NTLM, and NTLMv2 authentication.

2
Clients use only NTLM authentication, and they use NTLMv2 session security if the server supports it. Domain controller accepts LM, NTLM, and NTLMv2 authentication.

3
Clients use only NTLMv2 authentication, and they use NTLMv2 session security if the server supports it. Domain controllers accept LM, NTLM, and NTLMv2 authentication.

4
Clients use only NTLMv2 authentication, and they use NTLMv2 session security if the server supports it. Domain controller refuses LM authentication responses, but it accepts NTLM and NTLMv2.

5
Clients use only NTLMv2 authentication, and they use NTLMv2 session security if the server supports it. Domain controller refuses LM and NTLM authentication responses, but it accepts NTLMv2.
Member: TiTux
TiTux Oct 27, 2010 at 17:44:11 (UTC)
Goto Top
So,

konnte das Problem lösen. Es lag tatsächlich an der alten Samba Version, die konnte mit einem Windows 7 nichts anfangen.
Samba ist jetzt in der Version 3.5.6 installiert und nun klappt es auch mit Windows 7 ;)

Gruß
TiTux
Member: Marco-83
Marco-83 Oct 27, 2010 at 17:49:45 (UTC)
Goto Top
Na dann ist ja jetzt alles gut. Ich konnte leider hier die Samba Version nicht updaten. Darum musste ich mein armes Windows verbiegen ;(

bye
Member: TiTux
TiTux Oct 27, 2010 at 20:52:04 (UTC)
Goto Top
Hoffentlich jetzt nix "kaputt" gebogen. Danke auch Dir für Deine Unterstützung!

Schönen Abned noch.

ciao