|
View:
New views
20 Messages
—
Rating Filter:
Alert me
|
|
|
Re: ldapsam:trusted = yes kills smbdOn Thu, Sep 29, 2005 at 09:55:29PM +0100, Daniel Wilson wrote:
> Hi, > > we want to use ldapsam:trusted=yes to improve performace as nss_ldap > is killing our ldap server doing enumeration. > > once i enable it smbd dies silently... > > > this is the last part of a ./smbd -d 10 -i > > NT user token: (NULL) > UNIX token of user 0 > Primary group is 0 and contains 0 supplementary groups > smbldap_search: base => > [ou=groups,ou=filestore,dc=sunderland,dc=ac,dc=uk], filt > er => [(&(objectClass=posixGroup)(|(memberUid=nobody) > (gidNumber=65533)))], scope > => [2] > primary group of [nobody] not found > pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0 > get_user_groups_from_local_sam failed > attempting to free (and zero) a server_info structure > attempting to free (and zero) a server_info structure > /tmp/dan lines 520-538/538 (END) > > however i do have a group called nobody with gidNumber of 65533 and > nobody as a memberUid, when i run the smbldap_search query i do get a > result! > > my nobody user in ldap has a gidNumber of 65533 too! > > Help would be appreciated! Any chance of tracing it using strace ? That would tell us what was causing it to abort. Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |
|
|
ldapsam:trusted = yes kills smbdHi,
we want to use ldapsam:trusted=yes to improve performace as nss_ldap is killing our ldap server doing enumeration. once i enable it smbd dies silently... this is the last part of a ./smbd -d 10 -i NT user token: (NULL) UNIX token of user 0 Primary group is 0 and contains 0 supplementary groups smbldap_search: base => [ou=groups,ou=filestore,dc=sunderland,dc=ac,dc=uk], filt er => [(&(objectClass=posixGroup)(|(memberUid=nobody) (gidNumber=65533)))], scope => [2] primary group of [nobody] not found pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0 get_user_groups_from_local_sam failed attempting to free (and zero) a server_info structure attempting to free (and zero) a server_info structure /tmp/dan lines 520-538/538 (END) however i do have a group called nobody with gidNumber of 65533 and nobody as a memberUid, when i run the smbldap_search query i do get a result! my nobody user in ldap has a gidNumber of 65533 too! Help would be appreciated! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Daniel Wilson Systems Administrator IT & Communications Service University of Sunderland Unit1 Technology Park Chester Road Sunderland SR2 7PT Tel: 0191 515 2695 This e-mail contains information which is confidential and may be privileged and is for the exclusive use of the recipient. It is the responsibility of the recipient to ensure that this message and its attachments are virus free. Any views or opinions presented are solely those of the author and do not necessarily represent those of the University, unless otherwise specifically stated. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |
|
|
|
|
|
Re: ldapsam:trusted = yes kills smbdOn Thu, Sep 29, 2005 at 10:08:14PM +0100, Daniel Wilson wrote:
> Hi! > > i did an bash# strace ./smbd -d 10 -i 2 >/tmp/smbd-strace.txt > > > available at: > > http://www.sunderland.ac.uk/~ws0dwi/smbd-strace.txt Hmmm - this ends with exit_group(-1) which is a normal exit. So it's not failing due to a core dump or signal, it's terminating deliberately. Can you run under gdb : gdb --args ./smbd -d 10 -i then: b exit run At the breakpoint type "bt" to see the call stack. Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |
|
|
|
|
|
Re: ldapsam:trusted = yes kills smbdOn Thu, Sep 29, 2005 at 10:25:11PM +0100, Daniel Wilson wrote:
> ok done that and produces this: (which ends in "Cannot access memory > at address 0x7fc0000000") > .... > .. > > [Thread debugging using libthread_db enabled] > [New Thread 182909114432 (LWP 8451)] > push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1 > push_conn_ctx(0) : conn_ctx_stack_ndx = 0 > setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1 > NT user token: (NULL) > UNIX token of user 0 > Primary group is 0 and contains 0 supplementary groups > smbldap_search: base => > [ou=groups,ou=filestore,dc=sunderland,dc=ac,dc=uk], filter => [(& > (objectClass=posixGroup)(|(memberUid=nobody)(gidNumber=65533)))], > scope => [2] > primary group of [nobody] not found > pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0 > get_user_groups_from_local_sam failed > attempting to free (and zero) a server_info structure > attempting to free (and zero) a server_info structure > [Switching to Thread 182909114432 (LWP 8451)] Ah - this isn't useful I'm afraid, but there is something interesting here - why is smbd using threads ? You do know it's not thread safe... I'm afraid you'll need to set a breakpoint on smbldap_search and then single step until the thing exits to see what it's doing. How are you building smbd - it shouldn't be linked to pthreads. Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |
|
|
|
|
|
Re: ldapsam:trusted = yes kills smbdOn Thu, Sep 29, 2005 at 10:43:26PM +0100, Daniel Wilson wrote:
> Successfully added passdb backend 'guest' > Attempting to find an passdb backend to match > ldapsam:ldap://vila.sunderland.ac.uk (ldapsam) > Found pdb backend ldapsam > Searching for:[(&(objectClass=sambaDomain)(sambaDomainName=UNI-STAFF))] > > Breakpoint 1, 0x00000000005daa33 in smbldap_search () > (gdb) > (gdb) > (gdb) n > Single stepping until exit from function smbldap_search, > which has no line number information. > smbldap_search: base => [dc=sunderland,dc=ac,dc=uk], filter => [(& > (objectClass=sambaDomain)(sambaDomainName=UNI-STAFF))], scope => [2] > The connection to the LDAP server was closed > smbldap_open_connection: ldap://vila.sunderland.ac.uk > smbldap_open_connection: connection opened > ldap_connect_system: Binding to ldap server > ldap://vila.sunderland.ac.uk as "cn=Directory Manager" > ldap_connect_system: succesful connection to the LDAP server > ldap_connect_system: LDAP server does not support paged results > (gdb) n > Single stepping until exit from function pdb_getsampwsid, > which has no line number information. > 0x00000000005b5306 in make_new_server_info_guest () > (gdb) n > Single stepping until exit from function make_new_server_info_guest, > which has no line number information. > pop_sec_ctx (0, 0) - sec_ctx_stack_ndx = 0 > [Thread debugging using libthread_db enabled] > [New Thread 182909114432 (LWP 8489)] > push_sec_ctx(0, 0) : sec_ctx_stack_ndx = 1 > push_conn_ctx(0) : conn_ctx_stack_ndx = 0 > setting sec ctx (0, 0) - sec_ctx_stack_ndx = 1 > NT user token: (NULL) > UNIX token of user 0 > Primary group is 0 and contains 0 supplementary groups > [Switching to Thread 182909114432 (LWP 8489)] > > Breakpoint 1, 0x00000000005daa33 in smbldap_search () > (gdb) n > Single stepping until exit from function smbldap_search, > which has no line number information. > smbldap_search: base => > [ou=groups,ou=filestore,dc=sunderland,dc=ac,dc=uk], filter => [(& > (objectClass=posixGroup)(|(memberUid=nobody)(gidNumber=65533)))], > scope => [2] > 0x0000000000559503 in ldapsam_enum_group_memberships () > (gdb) n > Single stepping until exit from function > Single stepping until exit from function make_new_server_info_guest, > which has no line number information. > 0x00000000005b547d in init_guest_info () > (gdb) n > Single stepping until exit from function init_guest_info, > which has no line number information. > 0x00000000005dd880 in main () > (gdb) n > Single stepping until exit from function main, > which has no line number information. Ok, you're exiting from main() here : if (!init_guest_info()) return -1; which is an immediate termination. You seem to be connecting to the LDAP server but it's failing to look up a guest user when looking there. This : if (!pdb_getsampwsid(sampass, &guest_sid)) { unbecome_root(); return NT_STATUS_NO_SUCH_USER; } is failing - it's looking for a user with sid : <global-sam-sid>-0x000001F5 where global-sam-sid is the domain sid of your domain. Looks like you don't have this user set up on your ldap server. Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |
|
|
Re: ldapsam:trusted = yes kills smbd-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 On Thu, 29 Sep 2005, Daniel Wilson wrote: > > Hi, > > Compiled as: > > bash# ./configure --prefix=/usr/local/uni-staff --with-ldapsam > > no didnt know was unsafe with threads!! it might be the ldap client loibs that are pulling pthreads. > Single stepping until exit from function init_guest_info, > which has no line number information. > 0x00000000005dd880 in main () This is probably the spot. IIRC there is a case where smbd will terminate immediately if it cannot initialize the guest account. I'm joining the thread (not pun intended) late, but what do the level 10 logs show? cheers, jerry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: For info see http://quantumlab.net/pine_privacy_guard/ iD8DBQFDPGE8IR7qMdg1EfYRApxQAKCTK1R4MdvTEeux1xfKG1dwoaHQcgCeP9qP /FMznNGoaBq4jqS+0P1ia1c= =hrlV -----END PGP SIGNATURE----- -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |
|
|
|
|
|
Re: ldapsam:trusted = yes kills smbdOn Thu, Sep 29, 2005 at 11:16:03PM +0100, Daniel Wilson wrote:
> > ok i have now changed the sambaSID on the user nobody to be <gloabl- > sam-sid>-501 > > it now finds the user nobody but still says it can't find the primary > group: > for the user nobody, here are my ldap entries: > > # nobody, People, Staff, Itacs, sunderland.ac.uk > dn: uid=nobody,ou=People,ou=Staff,ou=Itacs,dc=sunderland,dc=ac,dc=uk > sambaSID: S-1-5-21-82148923-2461359520-1342846908-501 > cn: nobody > uid: nobody > gidNumber: 65533 > sambaPrimaryGroupSID: S-1-0-0 (which i understand is nobody on windows) No, that sid S-1-0-0 is wrong I think. Look here for details : http://linux-ntfs.sourceforge.net/ntfs/concepts/sid.html -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |
|
|
|
|
|
Re: ldapsam:trusted = yes kills smbd-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 On Thu, 29 Sep 2005, Daniel Wilson wrote: > ok cool > > i have changed the sambaPrimaryGroupSid: S-1-1-0 on uid=nobody and > changed sambaSID: S-1-1-0 on group nobody and it now starts yeh!! :) > > but now if i remove ldap from /etc/nsswitch.conf > > passwd: file > group: file > > i cant login to the domain: > > [2005/09/29 23:27:54, 2] lib/smbldap.c:smbldap_open_connection(692) > smbldap_open_connection: connection opened > [2005/09/29 23:27:54, 2] passdb/pdb_ldap.c:init_sam_from_ldap(499) > init_sam_from_ldap: Entry found for user: ws0dwi > [2005/09/29 23:27:54, 1] auth/auth_util.c:make_server_info_sam(840) > User ws0dwi in passdb, but getpwnam() fails! > [2005/09/29 23:27:54, 0] auth/auth_sam.c:check_sam_security(324) > check_sam_security: make_server_info_sam() failed > with 'NT_STATUS_NO_SUCH_USER' > [2005/09/29 23:27:54, 2] auth/auth.c:check_ntlm_password(312) > check_ntlm_password: Authentication for user [ws0dwi] -> [ws0dwi] > FAILED with error NT_STATUS_NO_SUCH_USER > > > is this me being ignorant, or do i still need ldap in the > nsswitch.conf file? thought the idea was that ldapsam:trusted = yes > ment we didnt need to have ldap in nsswitch.conf so nss_ldap wouldnt > enumerate all the users? the trusted=yes is not a complete replacement for nss_ldap IIRC. I would need to check to be sure. but what I remember is that this allows for certain group membership optimizations. Volker, can you confirm or correct me? cheers, jerry -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: For info see http://quantumlab.net/pine_privacy_guard/ iD8DBQFDPG0JIR7qMdg1EfYRAqRkAJ9YNZM4lQa4a88LqwrNE+U0vPAx6wCfffBt jfLCuZ5Gq+yngy99VJdqZTA= =JXoF -----END PGP SIGNATURE----- -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |
|
|
Re: ldapsam:trusted = yes kills smbdOn Thu, Sep 29, 2005 at 11:37:37PM +0100, Daniel Wilson wrote:
> ok cool > > i have changed the sambaPrimaryGroupSid: S-1-1-0 on uid=nobody and > changed sambaSID: S-1-1-0 on group nobody and it now starts yeh!! :) > > but now if i remove ldap from /etc/nsswitch.conf > > passwd: file > group: file > > i cant login to the domain: > > [2005/09/29 23:27:54, 2] lib/smbldap.c:smbldap_open_connection(692) > smbldap_open_connection: connection opened > [2005/09/29 23:27:54, 2] passdb/pdb_ldap.c:init_sam_from_ldap(499) > init_sam_from_ldap: Entry found for user: ws0dwi > [2005/09/29 23:27:54, 1] auth/auth_util.c:make_server_info_sam(840) > User ws0dwi in passdb, but getpwnam() fails! > [2005/09/29 23:27:54, 0] auth/auth_sam.c:check_sam_security(324) > check_sam_security: make_server_info_sam() failed > with 'NT_STATUS_NO_SUCH_USER' > [2005/09/29 23:27:54, 2] auth/auth.c:check_ntlm_password(312) > check_ntlm_password: Authentication for user [ws0dwi] -> [ws0dwi] > FAILED with error NT_STATUS_NO_SUCH_USER > > > is this me being ignorant, or do i still need ldap in the > nsswitch.conf file? thought the idea was that ldapsam:trusted = yes > ment we didnt need to have ldap in nsswitch.conf so nss_ldap wouldnt > enumerate all the users? Ah, no - smbd is still calling the system getpwnam and others so I think you're still going to need ldap in nsswitch.conf. Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |
|
|
Re: ldapsam:trusted = yes kills smbdJeremy Allison wrote:
> Ah, no - smbd is still calling the system getpwnam and others > so I think you're still going to need ldap in nsswitch.conf. I'd say the manpage (smb.conf) is a bit misleading then: [...] If these assumptions are met,ldapsam:trusted=yes can be activated and Samba can completely bypass the NSS system to query user information. Optimized LDAP queries can speed up domain logon and administration tasks a lot.[...] grz Paul -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |
|
|
|
|
|
Re: Re: ldapsam:trusted = yes kills smbdOn Fri, Sep 30, 2005 at 12:52:17AM +0100, Daniel Wilson wrote:
> ok so do i still need ldap in the nsswitch.conf file then? or do i > still need it but samba wont use nss_ldap to do getpwdent() etc..? Yes you still need it as Samba is going to use it. I'll look into modifying smbd so that all getpwXXX calls go via passdb and thus take advantage of LDAP if that's configured directly. That'll have to be for 3.0.21+ though. Jeremy. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |
|
|
Re: ldapsam:trusted = yes kills smbdOn Thu, Sep 29, 2005 at 05:39:03PM -0500, Gerald (Jerry) Carter wrote:
> the trusted=yes is not a complete replacement for nss_ldap IIRC. I would > need to check to be sure. but what I remember is that this allows for > certain group membership optimizations. > > Volker, can you confirm or correct me? You're correct. You still need ldap in /etc/nsswitch.conf, be it only for the other unix programs running. The major optimizations come from the assumption that all accounts relevant to Samba are in LDAP and both the posix and samba object classes are on the same LDAP entry. Volker -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |
|
|
Re: ldapsam:trusted = yes kills smbd - THANKS :)Thanks guys for your help so quickly, who says open source support is
rubbish ;) Results: I came in this morning and.... Our LDAP server is now running at a load average of 0.4-9 with slapd at 10-30% :) the lastweek its been at a load average of 16-23 slapd at 98% :( Now we have no LDAP queries of "filter=(objectclass=posixaccount)" which was what was killing our LDAP server as it was trying to get over 50,000 entries. :) every few minutes. Having ldapsam:trusted = yes has greatly improved our proformance :) and my teams worry :) The University of Sunderland (UK) are commited to using open source software. We in the small IT Systems Team would like to try and get the University to make a donation to the Samba Project, how would we go about this if its possible? Regards Daniel Wilson Jeremy Allison wrote: >On Thu, Sep 29, 2005 at 11:16:03PM +0100, Daniel Wilson wrote: > > >>ok i have now changed the sambaSID on the user nobody to be <gloabl- >>sam-sid>-501 >> >>it now finds the user nobody but still says it can't find the primary >>group: >>for the user nobody, here are my ldap entries: >> >># nobody, People, Staff, Itacs, sunderland.ac.uk >>dn: uid=nobody,ou=People,ou=Staff,ou=Itacs,dc=sunderland,dc=ac,dc=uk >>sambaSID: S-1-5-21-82148923-2461359520-1342846908-501 >>cn: nobody >>uid: nobody >>gidNumber: 65533 >>sambaPrimaryGroupSID: S-1-0-0 (which i understand is nobody on windows) >> >> > >No, that sid S-1-0-0 is wrong I think. Look here for details : > >http://linux-ntfs.sourceforge.net/ntfs/concepts/sid.html > > -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |
|
|
Re: ldapsam:trusted = yes kills smbdHello,
I've just seen this thread.. I had exactly the same problem and posted on it a few weeks ago. I obviously didn't express it clearly enough, but I asked for an explanation of the group mapping stuff in samba 3.0.20 because it doesn't seem to be documented, especially the fact that samba won't start if the builtin groups aren't mapped. Here is an extract from my posting: > I may be missing something, but it seems that there has been a change > between 3.0.14a and 3.0.20 which means that a user's primary UNIX > group > HAS to be mapped to a valid NT group (i.e. the primary UNIX group in > the > LDAP DB has to have the sambagroupmapping attribute and a SID). Can > anyone confirm this as a new requirement or am I being a bit stupid? > > I'm using an LDAP backend with no IDmap or winbind. -- Tom. ---------------------------------------------------------------------------- Tom Crummey, Systems and Network Manager, EMAIL: tom@... Department of Electronic and Electrical Engineering, University College London, TEL: +44 (0)20 7679 3898 Torrington Place, FAX: +44 (0)20 7388 9325 London, UK, WC1E 7JE. ---------------------------------------------------------------------------- -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/listinfo/samba |
| Free embeddable forum powered by Nabble | Forum Help |