• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

Mehrfacher Login notwendig

Hi zusammen,

ich haben einen W2k8R2 DC. Während der SUSE-Linux-Installation (Problem taucht in allen 11er Versionen auf) habe ich die Windowsuserverwaltung ausgewählt. Das Laptop hat Verbindung über WLAN als auch über LAN zum DC. Manchmal nur WLAN. In seltenen Fällen kann ich mich direkt mit einem Domänenbenutzer einloggen, meistens misslingt jedoch der erste Login und erst beim 2. Versuch klappt es. Oft habe ich auch gar keine Domäne zur Auswahl, erst nach ca. 1-2 Minuten, oder das Auswahlfeld hängt komplett. X ist quasi eingefroren. Gehe ich auf die Kommandozeile init3, init5 klappt's dann gelegentlich. Manchmal kommt X dann aber auch gar nicht mehr hoch, erst nach einem reboot klappt es wieder. Da ich das Problem nun schon in der kompletten 11er Reihe erlebt habe, denke ich dass es nach so vielen Neuinstallationen nicht an einem Virus liegen. Auch Windowsclients haben gar keine Probleme beim Login. Ich vermute also irgendeinen Bug in Samba, X11 oder pam. Das einzige was ich in den Logs finden kann ist:

[2011/01/14 09:47:21.191780, 1] libads/kerberos.c:130(smb_krb5_get_ntstatus_from_krb5_error_init_creds_opt)
no krb5_error
[2011/01/14 09:47:21.214989, 1] libads/authdata.c:402(kerberos_return_pac)
kinit failed for 'Martin@DOMAENE.HOME' with: Preauthentication failed (-1765328360)

Hat jemand eine Idee?
 
OP
M

MartinLehmann

Newbie
Das hilft leider nicht. Denn das passiert während der Installation ja alles schon automatisch. Es ist ja auch nicht so, dass es gar nicht funktioniert, sonder bei 90% der Fälle muss ich mich 2 x einloggen und nur in 10% der Fälle klappt es auf Anhieb. War ich schon einmal nach dem Systemstart eingeloggt, klappt es immer. Nur direkt nach dem Booten nicht. Auch warten hilft da nichts (falls noch nicht alles initialisiert ist). Wenn ich das System boot kann ich es auch 10 Minuten stehen lassen und trotzdem bekomme ich in einigen Fällen nach dem Login einfach erneut den Anmeldebildschirm präsentiert. Das ist schon seltsam!
 

warpi

Hacker
Hi MartinLehmann.
Poste doch bitte mal die folgenden Daten:
etc/krb5.conf
etc/security/pam_unix2.conf
smb.conf
etc/nsswitch.conf
Denn in diesen Konfigdateien müssen die Einträge stimmig sein.
 
OP
M

MartinLehmann

Newbie
Die sind so, wie sie standardmäßig nach der Installation angelegt werden.

kerb.conf:
[libdefaults]
default_realm = MARTINLEHMANN.HOME
clockskew = 300
# default_realm = EXAMPLE.COM

[realms]
MARTINLEHMANN.HOME = {
kdc = dc.martinlehmann.home
default_domain = martinlehmann.home
admin_server = dc.martinlehmann.home
}
# EXAMPLE.COM = {
# kdc = kerberos.example.com
# admin_server = kerberos.example.com
# }

[logging]
kdc = FILE:/var/log/krb5/krb5kdc.log
admin_server = FILE:/var/log/krb5/kadmind.log
default = SYSLOG:NOTICE:DAEMON
[domain_realm]
.martinlehmann.home = MARTINLEHMANN.HOME
[appdefaults]
pam = {
ticket_lifetime = 1d
renew_lifetime = 1d
forwardable = true
proxiable = false
minimum_uid = 1
}

eine pam_unix2.conf habe ich nicht im security Verzeichnis nur eine pam_winbind.conf:

#
# pam_winbind configuration file
#
# /etc/security/pam_winbind.conf
#

[global]
cached_login = yes
krb5_auth = yes
krb5_ccache_type = FILE

# turn on debugging
;debug = no

# turn on extended PAM state debugging
;debug_state = no

# request a cached login if possible
# (needs "winbind offline logon = yes" in smb.conf)
;cached_login = no

# authenticate using kerberos
;krb5_auth = no

# when using kerberos, request a "FILE" krb5 credential cache type
# (leave empty to just do krb5 authentication but not have a ticket
# afterwards)
;krb5_ccache_type =

# make successful authentication dependend on membership of one SID
# (can also take a name)
;require_membership_of =

# password expiry warning period in days
;warn_pwd_expire = 14

# omit pam conversations
;silent = no

# create homedirectory on the fly
;mkhomedir = no

Die smb.conf liegt bei mir (Version 11.3) im Samba-Verzeichnis:

# smb.conf is the main Samba configuration file. You find a full commented
# version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the
# samba-doc package is installed.
# Date: 2010-09-15
[global]
workgroup = MARTINLEHMANN
passdb backend = tdbsam
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
map to guest = Bad User
include = /etc/samba/dhcp.conf
logon path = \\%L\profiles\.msprofile
logon home = \\%L\%U\.9xprofile
logon drive = P:
usershare allow guests = No
idmap gid = 10000-20000
idmap uid = 10000-20000
realm = MARTINLEHMANN.HOME
security = ADS
template homedir = /home/%D/%U
template shell = /bin/bash
winbind offline logon = yes
winbind refresh tickets = yes
[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes
[profiles]
comment = Network Profiles Service
path = %H
read only = No
store dos attributes = Yes
create mask = 0600
directory mask = 0700
[users]
comment = All users
path = /home
read only = No
inherit acls = Yes
veto files = /aquota.user/groups/shares/
[groups]
comment = All groups
path = /home/groups
read only = No
inherit acls = Yes
[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @ntadmin root
force group = ntadmin
create mask = 0664
directory mask = 0775

und die nsswitch ist so konfiguriert worden:

#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Legal entries are:
#
# compat Use compatibility setup
# nisplus Use NIS+ (NIS version 3)
# nis Use NIS (NIS version 2), also called YP
# dns Use DNS (Domain Name Service)
# files Use the local files
# [NOTFOUND=return] Stop searching if not found so far
#
# For more information, please read the nsswitch.conf.5 manual page.
#

# passwd: files nis
# shadow: files nis
# group: files nis

passwd: compat winbind
group: compat winbind

hosts: files mdns4_minimal [NOTFOUND=return] dns
networks: files dns

services: files
protocols: files
rpc: files
ethers: files
netmasks: files
netgroup: files nis
publickey: files

bootparams: files
automount: files nis
aliases: files

Der Witz ist, es geht ja auch alles! Nur eben nicht auf Anhieb, meistens (in 90% der Fälle) brauche ich erst mal einen Login der fehlschlägt und alle danach funktionieren dann einwandfrei. Das ich mir irgendeinen Schadcode eingefangen habe schliesse ich aus, da ich diese Probleme schon in der kompletten 11er Serie von OpenSuSE habe - egal wie oft ich neu installiere.
 

warpi

Hacker
Hi MartinLehmann.
Bei mir war die pam_unix2.conf auch nicht vorhanden. Ich hab dann die Datei neu erstellt.
Diese Einträge hab ich dann in die pam_unix2.conf geschrieben:
Code:
auth: use_krb5 nullok
account: use_krb5
password: use_krb5 nullok
session: none
Bei mir sehen die Einträge in den anderen Konfigdateien auch etwas anders aus. Nachdem das ja bei dir prinzipiell mit der Anmeldung klappt, versuch mal die pam_unix2.conf und schau, ob die Zeitsynchronisation mit dem DC und dem Client eingerichtet ist.
Sonst fällt mir auch nix mehr ein.
Viel Glück.
 
OP
M

MartinLehmann

Newbie
Uhrzeiten sind in Sync.
Das anlegen der erwähnten pam_unix2.conf im pam.d Verz. hat leider auch keine Änderung gebracht.
 
Oben