[Samba/LDAP]Windows client moet twee keer joinen

Pagina: 1
Acties:

Acties:
  • 0 Henk 'm!

  • silentkiller
  • Registratie: Februari 2003
  • Laatst online: 07-09 12:56
Hoi allen,
Ik draai debian lenny met daarop samba (3.5) en OpenLDAP (2.4.11). Ook de smbldap-tools zijn geïnstalleerd. De server fungeert als een PDC. Als ik een machine aan het domain wil toevoegen krijg ik een error van windows: "The specified computer account could not be found". De machine wordt echter wel toegevoegd in de LDAP database maar heeft geen Samba attributen. Klik ik de error weg en laat ik de machine opnieuw joinen, dan is het echter wel een succes.
Dit is zeer vreemd. Het lukt dus niet van de eerste keer maar de tweede keer wel. Dit is zowel het geval bij een XP, Vista en een windows 7 cliënt.
Log na poging 1:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
[2010/03/08 11:35:35.135255,  2] smbd/sesssetup.c:1390(setup_new_vc_session)
  setup_new_vc_session: New VC == 0, if NT4.x compatible we would close all old resources.
[2010/03/08 11:35:35.158356,  2] smbd/sesssetup.c:1390(setup_new_vc_session)
  setup_new_vc_session: New VC == 0, if NT4.x compatible we would close all old resources.
[2010/03/08 11:35:35.159037,  2] lib/smbldap.c:950(smbldap_open_connection)
  smbldap_open_connection: connection opened
[2010/03/08 11:35:35.184862,  2] passdb/pdb_ldap.c:572(init_sam_from_ldap)
  init_sam_from_ldap: Entry found for user: root
[2010/03/08 11:35:35.242603,  2] passdb/pdb_ldap.c:2446(init_group_from_ldap)
  init_group_from_ldap: Entry found for group: 513
[2010/03/08 11:35:35.246777,  2] passdb/pdb_ldap.c:2446(init_group_from_ldap)
  init_group_from_ldap: Entry found for group: 512
[2010/03/08 11:35:35.246893,  2] auth/auth.c:304(check_ntlm_password)
  check_ntlm_password:  authentication for user [root] -> [root] -> [root] succeeded
[2010/03/08 11:35:35.353990,  2] auth/auth.c:314(check_ntlm_password)
  check_ntlm_password:  Authentication for user [qsdf] -> [qsdf] FAILED with error NT_STATUS_NO_SUCH_USER
[2010/03/08 11:35:35.503246,  0] rpc_server/srv_netlog_nt.c:669(_netr_ServerAuthenticate3)
  _netr_ServerAuthenticate3: no challenge sent to client QSDF-PC
[2010/03/08 11:35:35.664174,  2] auth/auth.c:314(check_ntlm_password)
  check_ntlm_password:  Authentication for user [qsdf] -> [qsdf] FAILED with error NT_STATUS_NO_SUCH_USER
[2010/03/08 11:35:35.811769,  2] rpc_server/srv_samr_nt.c:4115(_samr_LookupDomain)
  Returning domain sid for domain SAMBADOM -> S-1-5-21-2536920342-1981552595-828935944

In LDAP is de machine (qsdf-PC$) toegevoegd na poging één, echter zonder samba attributen (als dit zo noemt?)
Log poging 2 (succesvol)
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
[2010/03/08 12:05:27.002217,  2] smbd/sesssetup.c:1390(setup_new_vc_session)
  setup_new_vc_session: New VC == 0, if NT4.x compatible we would close all old resources.
[2010/03/08 12:05:27.005300,  2] smbd/sesssetup.c:1390(setup_new_vc_session)
  setup_new_vc_session: New VC == 0, if NT4.x compatible we would close all old resources.
[2010/03/08 12:05:27.005945,  2] lib/smbldap.c:950(smbldap_open_connection)
  smbldap_open_connection: connection opened
[2010/03/08 12:05:27.021907,  2] passdb/pdb_ldap.c:572(init_sam_from_ldap)
  init_sam_from_ldap: Entry found for user: root
[2010/03/08 12:05:27.087024,  2] passdb/pdb_ldap.c:2446(init_group_from_ldap)
  init_group_from_ldap: Entry found for group: 513
[2010/03/08 12:05:27.093436,  2] passdb/pdb_ldap.c:2446(init_group_from_ldap)
  init_group_from_ldap: Entry found for group: 512
[2010/03/08 12:05:27.093545,  2] auth/auth.c:304(check_ntlm_password)
  check_ntlm_password:  authentication for user [root] -> [root] -> [root] succeeded
[2010/03/08 12:05:27.144319,  2] auth/auth.c:314(check_ntlm_password)
  check_ntlm_password:  Authentication for user [qsdf] -> [qsdf] FAILED with error NT_STATUS_NO_SUCH_USER
[2010/03/08 12:05:27.261506,  0] rpc_server/srv_netlog_nt.c:669(_netr_ServerAuthenticate3)
  _netr_ServerAuthenticate3: no challenge sent to client QSDF-PC
[2010/03/08 12:05:27.392859,  2] auth/auth.c:314(check_ntlm_password)
  check_ntlm_password:  Authentication for user [qsdf] -> [qsdf] FAILED with error NT_STATUS_NO_SUCH_USER
[2010/03/08 12:05:27.488414,  2] rpc_server/srv_samr_nt.c:4115(_samr_LookupDomain)
  Returning domain sid for domain SAMBADOM -> S-1-5-21-2536920342-1981552595-828935944
[2010/03/08 12:05:27.505219,  2] lib/smbldap_util.c:277(smbldap_search_domain_info)
  smbldap_search_domain_info: Searching for:[(&(objectClass=sambaDomain)(sambaDomainName=SAMBADOM))]
[2010/03/08 12:05:27.592142,  2] passdb/pdb_ldap.c:1200(init_ldap_from_sam)
  init_ldap_from_sam: Setting entry for user: QSDF-PC$
[2010/03/08 12:05:27.633889,  2] passdb/pdb_ldap.c:2384(ldapsam_add_sam_account)
  ldapsam_add_sam_account: added: uid == QSDF-PC$ in the LDAP database
[2010/03/08 12:05:27.640585,  2] passdb/pdb_ldap.c:572(init_sam_from_ldap)
  init_sam_from_ldap: Entry found for user: qsdf-pc$
[2010/03/08 12:05:27.647470,  2] passdb/pdb_ldap.c:572(init_sam_from_ldap)
  init_sam_from_ldap: Entry found for user: qsdf-pc$
[2010/03/08 12:05:27.663073,  2] passdb/pdb_ldap.c:572(init_sam_from_ldap)
  init_sam_from_ldap: Entry found for user: qsdf-pc$
[2010/03/08 12:05:27.663625,  2] passdb/pdb_ldap.c:1200(init_ldap_from_sam)
  init_ldap_from_sam: Setting entry for user: qsdf-pc$
[2010/03/08 12:05:27.677274,  2] passdb/pdb_ldap.c:2061(ldapsam_update_sam_account)
  ldapsam_update_sam_account: successfully modified uid = qsdf-pc$ in the LDAP database
[2010/03/08 12:05:31.219790,  2] passdb/pdb_ldap.c:572(init_sam_from_ldap)
  init_sam_from_ldap: Entry found for user: qsdf-pc$
[2010/03/08 12:05:31.224875,  2] passdb/pdb_ldap.c:2446(init_group_from_ldap)
  init_group_from_ldap: Entry found for group: 515
[2010/03/08 12:05:31.232154,  2] passdb/pdb_ldap.c:2446(init_group_from_ldap)
  init_group_from_ldap: Entry found for group: 515

Na de tweede succesvolle poging heeft het computeraccount wel samba attributen in de LDAP directory.
Volgens mij heeft het niets te maken met de error "heck_ntlm_password: Authentication for user [qsdf] -> [qsdf] FAILED with error NT_STATUS_NO_SUCH_USER" aangezien deze bij poging twee ook terug te vinden is en het daar wel lukt om de machine toe te voegen aan het domein.

Op google vond ik dit terug: http://www.downloadpipe.c...er-foun-ftopict50420.html
Quote:
For whatever reason, when the ou=Computers entry was used, smbldap-tools
added the POSIX entry into the Computers ou but then tried to read it
back out from the Users ou. As the entry was non-existent in Users it
cannot add the Samba attributes to the POSIX side and hence windows
declares user cannot be found.

Some Googling revealed that you can store machine accounts in ou=Users
Volgens mij is dit niet van toepassing op mijn situatie aangezien het de twede keer wel lukt. Ik wil ook mijn computers gewoon in een andere ou hebben.
Verder vond ik ook nog iemand met hetzelfde probleem maar zijn log files verschilde van de mijnen.

Volgens mij ligt het niet aan de config files maar ik geef ze toch even mee:
smb.conf:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
[global]
    workgroup = SAMBADOM
    server string = %h server (Samba, Ubuntu)
    passdb backend = ldapsam:ldap://127.0.0.1
    passwd program = /usr/bin/passwd %u
    passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n *passwd:*password\supdated\ssuccessfully* .
    log level = 2
    syslog = 0
    log file = /var/log/samba/log.%m
    max log size = 1000
    add user script = /usr/sbin/smbldap-useradd -m "%u"
    delete user script = /usr/sbin/smbldap-userdel "%u"
    add group script = /usr/sbin/smbldap-groupadd -p "%g"
    delete group script = /usr/sbin/smbldap-groupdel "%g"
    add user to group script = /usr/sbin/smbldap-groupmod -m "%u" "%g"
    delete user from group script = /usr/sbin/smbldap-groupmod -x "%u" "%g"
    set primary group script = /usr/sbin/smbldap-usermod -g "%g" "%u"
    add machine script = /usr/sbin/smbldap-useradd -w "%u"
    logon path = 
    domain logons = Yes
    dns proxy = No
    ldap admin dn = cn=admin,dc=test,dc=com
    ldap delete dn = Yes
    ldap group suffix = ou=Groups
    ldap idmap suffix = ou=Users
    ldap machine suffix = ou=Computers
    ldap passwd sync = yes
    ldap suffix = dc=test, dc=com
    ldap ssl = no
    ldap user suffix = ou=Users
    panic action = /usr/share/samba/panic-action %d

[netlogon]
    comment = Network Logon Service
    path = /home/samba/netlogon
    guest ok = Yes
    share modes = No

[printers]
    comment = All Printers
    path = /var/spool/samba
    create mask = 0700
    printable = Yes
    browseable = No

[print$]
    comment = Printer Drivers
    path = /var/lib/samba/printers


slapd.conf:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# Global Directives:

# Features to permit
#allow bind_v2

# Schema and objectClass definitions
include         /etc/ldap/schema/core.schema
include         /etc/ldap/schema/cosine.schema
include         /etc/ldap/schema/nis.schema
include         /etc/ldap/schema/inetorgperson.schema
include         /etc/ldap/schema/samba.schema
include         /etc/ldap/schema/misc.schema


# Where the pid file is put. The init.d script
# will not stop the server if you change this.
pidfile         /var/run/slapd/slapd.pid

# List of arguments that were passed to the server
argsfile        /var/run/slapd/slapd.args

# Read slapd.conf(5) for possible values
logfile /var/log/slapd.log
loglevel        -1

# Where the dynamically loaded modules are stored
modulepath  /usr/lib/ldap
moduleload  back_hdb

# The maximum number of entries that is returned for a search operation
sizelimit 500

# The tool-threads parameter sets the actual amount of cpu's that is used
# for indexing.
tool-threads 1

#######################################################################
# Specific Backend Directives for hdb:
# Backend specific directives apply to this backend until another
# 'backend' directive occurs
backend     hdb

#######################################################################
# Specific Directives for database #1, of type hdb:
# Database specific directives apply to this databasse until another
# 'database' directive occurs
database        hdb

# The base of your directory in database #1
suffix          "dc=test,dc=com"

# rootdn directive for specifying a superuser on the database. This is needed
# for syncrepl.
# rootdn          "cn=admin,dc=test,dc=com"

# Where the database file are physically stored for database #1
directory       "/ldap_data"

# The dbconfig settings are used to generate a DB_CONFIG file the first
# time slapd starts.  They do NOT override existing an existing DB_CONFIG
# file.  You should therefore change these settings in DB_CONFIG directly
# or remove DB_CONFIG and restart slapd for changes to take effect.

# For the Debian package we use 2MB as default but be sure to update this
# value if you have plenty of RAM
dbconfig set_cachesize 0 2097152 0

# Sven Hartge reported that he had to set this value incredibly high
# to get slapd running at all. See http://bugs.debian.org/303057 for more
# information.

# Number of objects that can be locked at the same time.
dbconfig set_lk_max_objects 1500
# Number of locks (both requested and granted)
dbconfig set_lk_max_locks 1500
# Number of lockers
dbconfig set_lk_max_lockers 1500

# Indexing options for database #1
index           objectClass eq
index       uid,memberUid eq
index       sambaDomainName,gidNumber eq
index       sambaGroupType,sambaSID eq
index       sambaSIDList eq

# Save the time that the entry gets modified, for database #1
lastmod         on

# Checkpoint the BerkeleyDB database periodically in case of system
# failure and to speed slapd shutdown.
checkpoint      512 30

# Where to store the replica logs for database #1
# replogfile    /var/lib/ldap/replog

# The userPassword by default can be changed
# by the entry owning it if they are authenticated.
# Others should not be able to see it, except the
# admin entry below
# These access lines apply to database #1 only
access to attrs=userPassword,shadowLastChange,sambaNTPassword,sambaLMPassword
        by dn="cn=admin,dc=test,dc=com" write
        by anonymous auth
        by self write
        by * none

# Ensure read access to the base for things like
# supportedSASLMechanisms.  Without this you may
# have problems with SASL not knowing what
# mechanisms are available and the like.
# Note that this is covered by the 'access to *'
# ACL below too but if you change that as people
# are wont to do you'll still need this if you
# want SASL (and possible other things) to work 
# happily.
access to dn.base="" by * read

# The admin dn has full write access, everyone else
# can read everything.
access to *
        by dn="cn=admin,dc=test,dc=com" write
        by * read

# For Netscape Roaming support, each user gets a roaming
# profile for which they have write access to
#access to dn=".*,ou=Roaming,o=morsnet"
#        by dn="cn=admin,dc=test,dc=com" write
#        by dnattr=owner write

#######################################################################
# Specific Directives for database #2, of type 'other' (can be hdb too):
# Database specific directives apply to this databasse until another
# 'database' directive occurs
#database        <other>

# The base of your directory for database #2
#suffix     "dc=debian,dc=org"


Op de server draait verder bind9 met een NS en een A record naar de server voor test.com. Op de clients staat de primary DNS naar de server.

Hopelijk heeft iemand een tip want ik ben nu al een paar dagen aan het zoeken en ik kom er niet uit..

Acties:
  • 0 Henk 'm!

  • DutchNutcase
  • Registratie: Augustus 2005
  • Niet online

DutchNutcase

E = mc^2

Ik heb geen antwoord voor je, maar meer een vraag. Ik ben eigenlijk op zoek naar een manier om mijn windows server 2008 virtuele machine weg te gooien, maar ik wil toch een domein draaien met centrale login en authenticatie voor zowel windows als linux. OpenLDAP met Samba en voor linux natuurlijk NFS zou dit denk ik moeten kunnen, maar heb geen goede tutorials gevonden om het voor elkaar te krijgen. Hoe heb jij dit voor elkaar gekregen? Welke tutorials heb je gebruikt? En welke tools gebruik je?

Sorry voor eventuele topic-kaping, maar ben toch wel eens nieuwsgierig of ik inderdaad mijn windows server het raam uit kan werken.

ps. voor mij is het slechts een hobby dingetje voor thuis. De licentie voor windows server 2008 komt van MA3d

Luctor et Emergo || specs


Acties:
  • 0 Henk 'm!

  • Zwelgje
  • Registratie: November 2000
  • Laatst online: 09:41
DutchNutcase schreef op maandag 08 maart 2010 @ 16:04:
Ik heb geen antwoord voor je, maar meer een vraag. Ik ben eigenlijk op zoek naar een manier om mijn windows server 2008 virtuele machine weg te gooien, maar ik wil toch een domein draaien met centrale login en authenticatie voor zowel windows als linux. OpenLDAP met Samba en voor linux natuurlijk NFS zou dit denk ik moeten kunnen, maar heb geen goede tutorials gevonden om het voor elkaar te krijgen. Hoe heb jij dit voor elkaar gekregen? Welke tutorials heb je gebruikt? En welke tools gebruik je?

Sorry voor eventuele topic-kaping, maar ben toch wel eens nieuwsgierig of ik inderdaad mijn windows server het raam uit kan werken.

ps. voor mij is het slechts een hobby dingetje voor thuis. De licentie voor windows server 2008 komt van MA3d
mischien slim/handig om hier een eigen topic voor te openen :?

ik kan me voorstellen dat sommigen dat niet zo weten te waarderen (topic hijacking!)

A wise man's life is based around fuck you


Acties:
  • 0 Henk 'm!

  • silentkiller
  • Registratie: Februari 2003
  • Laatst online: 07-09 12:56
DutchNutcase schreef op maandag 08 maart 2010 @ 16:04:
Ik heb geen antwoord voor je, maar meer een vraag. Ik ben eigenlijk op zoek naar een manier om mijn windows server 2008 virtuele machine weg te gooien, maar ik wil toch een domein draaien met centrale login en authenticatie voor zowel windows als linux. OpenLDAP met Samba en voor linux natuurlijk NFS zou dit denk ik moeten kunnen, maar heb geen goede tutorials gevonden om het voor elkaar te krijgen. Hoe heb jij dit voor elkaar gekregen? Welke tutorials heb je gebruikt? En welke tools gebruik je?

Sorry voor eventuele topic-kaping, maar ben toch wel eens nieuwsgierig of ik inderdaad mijn windows server het raam uit kan werken.

ps. voor mij is het slechts een hobby dingetje voor thuis. De licentie voor windows server 2008 komt van MA3d
Geen probleem hoor. Ik heb het gedaan mbv deze tutorial: http://www.rrcomputerconsulting.com/view.php?article_id=3. Hij was vrij volledig maar aangezien ik het met debian doe moet je wel wat aanpassingen doen. (debian kent bv. geen auth-client-config).
Nog een tip waar ik even heb achter gezocht: windows 7 heeft registry tweaks nodig: http://old.nabble.com/Windows-7-RC-td23405949.html
Succes!

Acties:
  • 0 Henk 'm!

  • DutchNutcase
  • Registratie: Augustus 2005
  • Niet online

DutchNutcase

E = mc^2

Bedankt voor je hulp!

Ik had er wel aan gedacht dat een eigen topic eventueel beter zou zijn, maar ik vond mijn probleem voor mezelf niet belangrijk genoeg om het forum mee te vervuilen en nu kwam ik er zo op.

Ik blijf dit topic natuurlijk volgen voor een oplossing voor jouw probleem (en als het lang genoeg op zich laat wachten kan ik het misschien geven :P ).

Succes!

Luctor et Emergo || specs


Acties:
  • 0 Henk 'm!

  • silentkiller
  • Registratie: Februari 2003
  • Laatst online: 07-09 12:56
Iemand in de samba mailing list suggereerde het volgende:
"make sure to invoke nscd -i passwd at the end of your add machine/user script
and maybe sleep a second."

Ik paste mijn script regels aan naar "mbldap-useradd .. "%u" && nscd -i passwd && sleep 1s" maar ook dit had geen effect.

Acties:
  • 0 Henk 'm!

  • martdj
  • Registratie: Januari 2000
  • Laatst online: 12-09 11:07
silentkiller schreef op woensdag 10 maart 2010 @ 13:22:
Iemand in de samba mailing list suggereerde het volgende:
"make sure to invoke nscd -i passwd at the end of your add machine/user script
and maybe sleep a second."

Ik paste mijn script regels aan naar "mbldap-useradd .. "%u" && nscd -i passwd && sleep 1s" maar ook dit had geen effect.
Ik heb ook al ergens iets gelezen over -i toevoegen aan de smbldap-useradd voor het add machine script (create interdomain trust account). Voor mijn probleem was dat echter ook geen oplossing. Ik heb ook een Samba probleem, hoewel onze logs niet overeen komen. Mijn probleem is dat Windows 7 machines geen machine trust account kunnen opzetten (autorisatie fails). Geen idee of het toch met elkaar te maken heeft.
Pagina: 1