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

Samba+LDAP+PAM ->Maschinen-Account als User zu finden ?

Knappe

Hacker
Hallo,


setzte Samba 3.0.27-0.1.94 mit OpenLDAP 2.3.27-25 ein.

Habe aber schon seit geraumer Zeit das Problem, dass meine Logs mit nachfolgender Meldung (wird rd alle 30 Sekunden produziert) allmaehlich ueberlaufen :
Nov 25 17:56:53 myserver smbd[16614]: pdb_get_group_sid: Failed to find Unix account for myserver$
Nov 25 17:56:53 myserver smbd[16614]: [2007/11/25 17:56:53, 0]
Nov 25 17:56:53 myserver smbd[16614]: check_sam_security: make_server_info_sam() failed with 'NT_STATUS_NO_SUCH_USER'
Nov 25 17:57:03 myserver winbindd[16423]: [2007/11/25 17:57:03, 0]
Nov 25 17:57:03 myserver winbindd[16423]: Receiving SMB: Server stopped responding
Nun wollte ich dem Problem mal auf den Grund gehen bin aber im Endeffekt wohl gescheitert :(

Daher die Frage :
Warum versucht Samba bzw. PAM auf dem Server "myserver$" einen unix-user namens "myserver" zu finden ?


Habe jetzt mal einen Maschinen-Account namens "myserver" angelegt --> keine Aenderung (wie auch ...)


Zur Info hier mal meine /etc/pam.d/login (vielleicht hat das ja hiermit zu tun ?) :
auth sufficient pam_unix2.so nullok use_ldap
auth sufficient pam_winbind.so use_first_pass use_authtok
auth required pam_securetty.so
auth required pam_nologin.so
auth required pam_env.so
auth required pam_mail.so
account sufficient pam_ldap.so
account required pam_unix2.so
account sufficient pam_winbind.so user_first_pass use_authtok
password required pam_pwcheck.so nullok
password sufficient pam_unix2.so nullok use_ldap use_first_pass use_authtok
password sufficient pam_winbind.so use_first_pass use_authtok
session sufficient pam_unix2.so none use_ldap
session sufficient pam_winbind.so use_first_pass use_authtok
session required pam_limits.so
Und hier der Auszug aus meiner smb:
[global]
workgroup = HOME
server string = PDC
netbios name = MYSERVER

smb ports = 139

dos charset = UTF-8
display charset = UTF-8

security = user

pam password change = no
encrypt passwords = yes
unix password sync = no
ldap password sync = yes

passdb backend = ldapsam:ldap://ldapserver.example.de:389
passwd program = /usr/sbin/ldapsmb -m -u "%u" --passwd
passwd chat = *old*password* %o\n *new*password* %n\n *new*password* %n\n *changed*
username map = /etc/samba/user.map

interfaces = 127.0.0.1, 192.168.2.1, 192.168.3.1, 10.3.0.0/24
bind interfaces only = Yes
socket options = TCP_NODELAY SO_RCVBUF=65535 SO_SNDBUF=65535 IPTOS_LOWDELAY SO_KEEPALIVE

log level = 0 passdb:10 auth:10 winbind:10
log file = /var/log/samba/samba.log.%m
max log size = 10000
debug prefix timestamp = Yes

name resolve order = wins host bcast
max smbd processes = 1000
set primary group script = /usr/sbin/ldapsmb -m -u "%u" -gid "%g"
add machine script = /sbin/yast /usr/share/YaST2/data/add_machine.ycp %m$

os level = 99
preferred master = Yes
domain master = Yes
local master = yes
domain logons = Yes

profile acls = yes
logon path = \\%N\%U\.msprofil
logon home = \\%N\%U
logon drive = P:

wins proxy = Yes
wins support = Yes

ldap admin dn = cn=admin,dc=example,dc=de
ldap group suffix = ou=groups
ldap idmap suffix = ou=users
ldap machine suffix = ou=computers
ldap passwd sync = yes
ldap suffix = dc=example,dc=de
ldap ssl = no
ldap user suffix = ou=users


idmap uid = 1000-20000
idmap gid = 1000-20000
winbind use default domain = Yes

block size = 4096
use sendfile = Yes
cups options = raw
case sensitive = No
hide dot files = No
hide unreadable = Yes
fake oplocks = Yes
include = /etc/samba/dhcp.conf

Habe ich jetzt irgendwie einen "Denkfehler" ???
 
Btw,
Code:
socket options = SO_RCVBUF=65536 SO_SNDBUF=65535
verlangsamen samba.

Warum der Server sich selbst sucht könnte ich mir gerade nicht erklären.
 

stka

Guru
mach mal bitte ein
"ldapsearch -x -h localhost -D "cn=admin,dc=example,dc=de" "(cn=myserver)" -W
und poste das Ergebnis
 
OP
K

Knappe

Hacker
Ist bei mir der DHCP-Server-Eintrag

# ldapsearch -x -h ldapserver.myserver.de -D "cn=admin,dc=myserver,dc=de" "(cn=myserver)" -W
Enter LDAP Password:
# extended LDIF
#
# LDAPv3
# base <> with scope subtree
# filter: (cn=myserver)
# requesting: ALL
#

# myserver, myserver.de
dn: cn=myserver,dc=myserver,dc=de
cn: myserver
objectClass: top
objectClass: dhcpServer
dhcpServiceDN: cn=DHCP Config,dc=myserver,dc=de

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1
 

stka

Guru
hast du einen samba-host erstellet für die Maschine in deinem LDAP? Das sieht mir alles so komisch aus bei dir.
 
OP
K

Knappe

Hacker
hast du einen samba-host erstellet für die Maschine in deinem LDAP
Ja.

Hier mal die Ausgabe von
# net groupmap list
lp (S-1-5-21-1666760061-3954025905-2425877074-1015) -> lp
Administrators (S-1-5-32-544) -> 10010
Users (S-1-5-32-545) -> 10011
Samba Domain Users (S-1-5-21-1666760061-3954025905-2425877074-2027) -> Domain_users
Samba Domain Guests (S-1-5-21-1666760061-3954025905-2425877074-2029) -> Domain_guests
Samba Domain Admin (S-1-5-21-1666760061-3954025905-2425877074-2025) -> Domain_admins
Samba NT-Maschines (S-1-5-21-1666760061-3954025905-2425877074-2031) -> NT-Maschinen
users (S-1-5-21-1666760061-3954025905-2425877074-1201) -> users
root (S-1-5-21-1666760061-3954025905-2425877074-1001) -> root
LDAP Benutzer (S-1-5-21-1666760061-3954025905-2425877074-513) -> Benutzer
Guests (S-1-5-32-546) -> 10012
Operators (S-1-5-32-547) -> 10013
Authenticated Users (S-1-5-11) -> 10014
Network (S-1-5-2) -> 10015

Ich habe jetzt aber mal "Winbind" komplett deinstalliert.

Siehe da, PAM-Zugriffe erfolgen einwandfrei, sowohl fuer die Hosts, als auch fuer die User.

Auch keine der o.g. Eintraege mehr im LOG !

Zugriffe seitens aller Clients (Linux, WinXP und Vista) sehr schnell und voellig problemlos.

Ich habe waehrend meiner Recherchen "irgendwo" in einem User-Beitrag gelesen, dass
"Windbind" nur fuer den Betritt von
Linux-Rechnern bzw. Samba-Servern zu einer Windows AD / Domaene
benoetigt wird.

Wenn das so stimmt UND in der eigenen Konfiguration der Sama-Server der PDC ist, dann kann man wohl "gut und gern" auf "winbind" verzichten ?

Trotzdem ist es fuer den o.g Fehler immer noch keine venuenftige Erklaerung :(
 
Oben