[Samba] ldap_initialize: Bad parameter to an ldap routine
I searched and found this from Volker in 2007 same error message but the fix didn't fix in my case: http://lists.samba.org/archive/samba/2007-March/130093.html my system: ubuntu 10.04 LTS server samba 3.4.7 error: [2010/09/01 23:57:17, 5] winbindd/idmap.c:169(smb_register_idmap) Successfully added idmap backend 'ldap' [2010/09/01 23:57:17, 0] lib/smbldap.c:716(smb_ldap_setup_conn) ldap_initialize: Bad parameter to an ldap routine global section of config [global] unix extensions = no disable spoolss = Yes name resolve order = hosts workgroup = AD realm = AD.MYDOMAIN server string = %h server (Samba, Ubuntu) dns proxy = no log file = /var/log/samba/log.%m max log size = 1000 syslog = 0 log level = 3 passdb:0 auth:0 vfs:0 idmap:5 ldap debug level = 10 ldap debug threshold = 5 panic action = /usr/share/samba/panic-action %d security = ads kerberos method = system keytab encrypt passwords = true passdb backend = ldapsam:ldaps://ldap.ad.mydomain/ ldap ssl = off ldap admin dn = CN=ucenters-ldap,ou=users,OU=UCenters,DC=AD,DC=MYDOMAIN,DC=MYTLD obey pam restrictions = yes unix password sync = yes pam password change = no map to guest = bad user winbind enum groups = yes winbind enum users = yes idmap backend = ldap:ldap_url = ldaps://ldap.ad.mydomain/ idmap uid = 1-199 idmap gid = 1-199 idmap alloc backend = ldap idmap alloc config : ldap_url = ldaps://ldap.ad.mydomain/ idmap alloc config : ldap_base_dn = OU=Users,OU=UCenters,DC=AD,DC=MYDOMAIN,DC=MYTLD usershare allow guests = no Any hints? Thanks. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Implementing Samba4
Michael, all On 09/01/2010 10:15 PM, Michael Wood wrote: 2010/9/1 Daniel Müllermuel...@tropenklinik.de: On Wed, 1 Sep 2010 12:00:29 +0200, Michael Woodesiot...@gmail.com wrote: Hi 2010/9/1 Juan Asensio Sánchezoke...@gmail.com: El 1 de septiembre de 2010 09:54, Daniel Müller muel...@tropenklinik.deescribió: [...] Why do not just use the samba 4 internal ldap-server?? And just net rpc vampire the users and groups from I doubt net rpc vampire will do anything except give you an error message :) I believe the rpc vs. ads etc. options are considered to have been a mistake, so are not supported by Samba4's net command. Also, there is no support currently for vampiring from Samba3 to Samba4. Someone is working on a migration script, though. Check the How about: 2 Samba4-DCs with OpenLDAP 2.4.8 in Multi-Master-Replication at: http://lists.samba.org/archive/samba-technical/2008-April/058567.html I think perhaps Samba4 worked better with OpenLDAP in the past and it should also be fixed to work with it again in future, but at the moment it won't work: http://lists.samba.org/archive/samba-technical/2010-July/072445.html For various reasons, the OpenLDAP backend for Samba4 is not functional at this time. Here's the message where Lukasz Zalewski says he's working on the Samba 3 to Samba 4 migration script: http://lists.samba.org/archive/samba-technical/2010-August/072683.html Since web-based archives scrub the attachments i have attached the relevant scripts to this message: myldap-pub.py.org - Metze's original import script (attached for completeness) myldap-pub-2.dif - patch which extends functionality of the above by allowing use of ldap uri's and other customisations (custom filters, attribute values substitutions). Please note the script is not complete yet, but you should be able to import users, computers and groups (trusts are still TODO) HTH Luk samba-technical archives. --- myldap-pub.py.org 2010-08-10 12:29:40.563592748 +0100 +++ myldap-pub.py 2010-08-24 17:34:04.810586364 +0100 @@ -1,3 +1,5 @@ +#!/usr/bin/env python +# import sys from ldif import LDIFParser, LDIFWriter import ldap @@ -5,6 +7,8 @@ import binascii import base64 import re +from optparse import OptionParser, OptionGroup +from getpass import getpass class MyLDIFParser(LDIFParser): def __init__(self, input): @@ -379,6 +383,15 @@ SID_NAME_UNKNOWN = 8 #oops. SID_NAME_COMPUTER = 9 #machine +IMPORT_TYPE_USERS = 1 +IMPORT_TYPE_COMPUTERS = 2 +IMPORT_TYPE_TRUSTS= 4 +IMPORT_TYPE_GROUPS= 8 +IMPORT_TYPE_ALL = 15 + +import_types= dict({Users: IMPORT_TYPE_USERS, Computers: IMPORT_TYPE_COMPUTERS, Trusts: IMPORT_TYPE_TRUSTS, Groups: IMPORT_TYPE_GROUPS, All: IMPORT_TYPE_ALL}) +env_var_mapping = dict({%USERNAME%: sAMAccountName}) + class ImportSamba3SearchState: def __init__(self, basedn, scope, filterstr, importdn): self.basedn = basedn @@ -395,7 +408,11 @@ trusts_search, computers_search, users_search, - groups_search): + groups_search, +output_ignore_sids=False, +remove_attributes=[], +import_type=IMPORT_TYPE_ALL, +user_replace_attrs={}): self.domain = domain_search self.trusts = trusts_search @@ -418,7 +435,10 @@ # TODO self.new_next_rid = 14 - self.convertObjects() + self.convertObjects(remove_attributes=remove_attributes, +output_ignore_sids=output_ignore_sids, +import_type=import_type, +user_replace_attrs=user_replace_attrs) def parse_sambaAcctFlags(self, str): #print sambaAcctFlags '%s'\n % str @@ -1145,16 +1165,22 @@ return dn, entry def convert_sambaSamAccount(self, old, basedn, objectClass=user, - keep_sid=True, is_computer=False): - - name = old['uid'][0] - try: - ou = old['ou'][0] - except: - ou = 'DefaultOU' - pass + keep_sid=True, is_computer=False, +remove_attributes=[], +output_ignore_sids=False, +output_display=True, +user_replace_attrs={}, +disable_if_no_unicodePwd=False): + +name = old['uid'][0] + #try: + # ou = old['ou'][0] + #except: + # ou = 'DefaultOU' + # pass - ou_dn =
[Samba] configuration CTDB
Hi! I made the compilation of Samba with support for clustering as shown in the Wiki and ctdb.samb.org, however when starting the service with / etc / init.d / start services ctdb the error is returned. You must configure the location of the CTDB_RECOVERY_NODE. But I've created a directory called / cluster_storage / shared / is appended in the smb.conf file path on your [homes] path = / cluster_storage / shared writerable = yes. What else have it set to restart the service? I'm using Samba Version 3.2.5 on Debian Lenny 5. I appreciate any assistance, for I am with much difficulty to implement this configuration. Fábio Leandro Rodrigues Cordeiro CRC - Centro de Recursos Computacionais PUC Minas Guanhães tel:(33)3421 7931 www.inf.pucminas.br www.taichous.com -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] configuration CTDB
Hi! I made the compilation of Samba with support for clustering as shown in the Wiki and ctdb.samb.org, however when starting the service with / etc / init.d / start services ctdb the error is returned. You must configure the location of the CTDB_RECOVERY_NODE. But I've created a directory called / cluster_storage / shared / is appended in the smb.conf file path on your [homes] path = / cluster_storage / shared writerable = yes. What else have it set to restart the service? I'm using Samba Version 3.2.5 on Debian Lenny 5. I appreciate any assistance, for I am with much difficulty to implement this configuration. Fábio Leandro Rodrigues Cordeiro CRC - Centro de Recursos Computacionais PUC Minas Guanhães tel:(33)3421 7931 www.inf.pucminas.br www.taichous.com -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] samba 3.0.21b on Solaris 10 U5 : Error - checking configure summary ... configure: error: summary failure. Aborting config
Hi, I am trying to configure samba 3.0.21b with ads support on Solaris 10 U5 SPARC. ./configure is failing with the following error. Error: Using libraries: LIBS = -lresolv -lnsl -lsocket -liconv LDAP_LIBS = -lldap -llber AUTH_LIBS = checking configure summary... configure: error: summary failure. Aborting config Regards, Prabu -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] valid users option
Hello, I am using samba server as members of windows AD domain , with security = ADS, the logins unix and windows are aligned. Since the version 3.0.34 , I have strange behaviour on shares where we use valid users with unix groups it does'nt work. Nok: Valid users = @group1 Valid users = +group1 Still work : Valid users = Domain\user Valid users = user The bad workaround found , is to use a file users.map and add the entry below: user = domaine\user could you help me ? Regards. _ Pierre DUPEYRAT EMEA Unix Systems - Data Center HP AL Enterprise Services (France) SAS OnNET 21067296 Phone :+33 02 96 04 72 96 Fax: +33 02 96 04 83 41 mailto : pierre.dupey...@alcatel-lucent.commailto:pierre.dupey...@alcatel-lucent.com or pierre.dupey...@hp.commailto:pierre.dupey...@hp.com 4 rue Louis de Broglie - 22304 - Lannion -France -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] user permissions
Hello, I have a problem about reaching my share folder when the permission is 750 but whenever I change it to 755 I can see the content of the folder. for 750 I get this result: smbclient //serverip/sharename -U username smb: \ ls NT_STATUS_NETWORK_ACCESS_DENIED listing \* 0 blocks of size 0. 9 blocks available smb: \ but for 755 everything is fine but of course I don't get any write permission. Doesn't it mean that my samba user is seem as other? if yes what could be the reason? It comes to me, something goes terribly wrong. Thanks in advance Murat Can Tuna -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] Access Samba from Windows 3.1
Hello, I'm maintaining for historical reasons a couple of Windows 3.1 and Windows 95 installations. These run actually on Vmware. With the most recent version of Samba, I'm noticing that Microsoft Windows does not connect any more, and I get authentication error. How do I need to configure Samba in order to connect to the latest Samba server again? Unfortunately, I can't change the configuration of these old Windows installations. Hopefully, there are some options that I can write into smb.conf in order to re-enable old style Windows networking. Thanks for your help in advance. :-) Best Regards, G. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] unanswered questions
Hello, Since some months I can not get any feedback from you for my questions in two different account with the same name. I just wonder is there any specific reason for it? Maybe my english is not so clear or I ask wrong questions for wrong lists I don't know but in any case I think I should have been informed. Sincerely Yours Murat Can Tuna -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] user permissions
Hello, here we use these parameters: force user = samba force group = users create mode = 0770 directory mode = 0770 force create mode = 0770 force directory mode = 0770 At filesystem level, we set permissions as 775 and make user samba the owner and users the group of all shares. We, then, can map the shares using our common users (john, mary...) which are part of group users. Because of the force user parameter, our common users becomes user samba and then follow permissions configured in samba and filesystem. Since there are 2 levels of security (samba and filesystem) maybe some configuration (samba/filesystem permissions or group settings) could be preventing the access in your case (just an idea). -Original Message- From: samba-boun...@lists.samba.org [mailto:samba-boun...@lists.samba.org] On Behalf Of Murat Can Tuna Sent: quarta-feira, 1 de setembro de 2010 11:37 To: samba@lists.samba.org Subject: [Samba] user permissions Hello, I have a problem about reaching my share folder when the permission is 750 but whenever I change it to 755 I can see the content of the folder. for 750 I get this result: smbclient //serverip/sharename -U username smb: \ ls NT_STATUS_NETWORK_ACCESS_DENIED listing \* 0 blocks of size 0. 9 blocks available smb: \ but for 755 everything is fine but of course I don't get any write permission. Doesn't it mean that my samba user is seem as other? if yes what could be the reason? It comes to me, something goes terribly wrong. Thanks in advance Murat Can Tuna -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] samba slow and several Write andx Request
Hi all, I'm running version 3.0.28a on Ubuntu linux, and apparently from a day to another I got performance issues: without any change in smb.conf (except a few added shares) I have mac osx and linux clients getting a very slow upload/download speed. I've checked with other protocols, like scp and performances are good, so I can exclude a network/hardware problem. Other clients are still running fast (e.g., windows xp). Looking at a transmission dump I see a lot of Write Andx Request packages (and replies) all moving the data offset by 64 bytes, that I suspect is the cause for the slowing down speed. Is there some option or somehting I can investigate more? Thanks, Luca -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Access Samba from Windows 3.1
On Thu, Sep 2, 2010 at 8:04 AM, Public Mailing Lists li...@lists.cichon.com wrote: How do I need to configure Samba in order to connect to the latest Samba server again? Unfortunately, I can't change the configuration of these old Windows installations. Hopefully, there are some options that I can write into smb.conf in order to re-enable old style Windows networking. Interesting. Windows 3.1 with the workgroup add-on package (I used this with DOS) or WFWG 3.11? Always best to read the Changelog for all of the versions between the one you were at to the one you're moving to. As you don't mention versions I can only guess that there was a change in the default setting of some of these: lanman auth, client lanman auth, encrypt passwords, client plaintext auth. There may be others changes you want/need to be aware of as well. -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] samba 3.0.21b on Solaris 10 U5 : Error - checking configure summary ... configure: error: summary failure. Aborting config
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/01/2010 11:11 AM, prabu.muru...@emc.com wrote: Hi, I am trying to configure samba 3.0.21b with ads support on Solaris 10 U5 SPARC. ./configure is failing with the following error. Error: Using libraries: LIBS = -lresolv -lnsl -lsocket -liconv LDAP_LIBS = -lldap -llber AUTH_LIBS = checking configure summary... configure: error: summary failure. Aborting config Regards, Prabu Prabu, Any reason you are using that version? Not only is the latest 3.0.x 3.0.37 but it is discontinued and will no longer get security updates, etc: http://wiki.samba.org/index.php/Release_Planning_for_Samba_3.0 I would at least look at 3.4.x or 3.5.x (http://wiki.samba.org/index.php/Samba3_Release_Planning). You could also use the sunfreeware packages to eliminate the pain of compiling or use it as a reference of what libraries you would want: http://www.sunfreeware.com/programlistsparc10.html#samba Thanks, Robert - -- Robert Freeman-Day https://launchpad.net/~presgas GPG Public Key: http://keyserver.ubuntu.com:11371/pks/lookup?op=getsearch=0xBA9DF9ED3E4C7D36 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkx/ujIACgkQup357T5MfTY2fACfcfIL6XNp/XzqZewmYgF7tAc6 95MAn168L6/23Pg0YEUoETESBnEUX5sR =epmH -END PGP SIGNATURE- -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] unanswered questions
I don't recall seeing your questions here... Would you care to ask the questions again? How can two accounts with the same name be two accounts? Surely, they are one account... can you give a detailed and specific example? Regards, Quinn -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] samba 3.0.21b on Solaris 10 U5 : Error - checking configure summary ... configure: error: summary failure. Aborting config
Solaris 10 (with latest patches) should have samba 3.0.37 already included. smbd -b indicates it was built with ADS support. I don't know if it really works reliably or not, since I am not integrating with active directory. Sunfreeware.com samba did not include either zfs or nsswitch support.Also, Sunfreeware samba uses openldap while Sun's samba uses the OS ldap functionality. I found compiling Samba on Solaris to be quite a challenge. I did get EVENTUALLY get 3.4.8 compiled but not 3.5.2. I had to symlink /usr/ccs/bin/ld to gld. I also used gcc not Sun cc. It seems pretty obvious to me that Sun will not be doing any more work with Samba since they have an alternative CIFS (Windows) server product now. On 09/02/2010 10:52 AM, Robert Freeman-Day wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 09/01/2010 11:11 AM, prabu.muru...@emc.com wrote: Hi, I am trying to configure samba 3.0.21b with ads support on Solaris 10 U5 SPARC. ./configure is failing with the following error. Error: Using libraries: LIBS = -lresolv -lnsl -lsocket -liconv LDAP_LIBS = -lldap -llber AUTH_LIBS = checking configure summary... configure: error: summary failure. Aborting config Regards, Prabu Prabu, Any reason you are using that version? Not only is the latest 3.0.x 3.0.37 but it is discontinued and will no longer get security updates, etc: http://wiki.samba.org/index.php/Release_Planning_for_Samba_3.0 I would at least look at 3.4.x or 3.5.x (http://wiki.samba.org/index.php/Samba3_Release_Planning). You could also use the sunfreeware packages to eliminate the pain of compiling or use it as a reference of what libraries you would want: http://www.sunfreeware.com/programlistsparc10.html#samba Thanks, Robert - -- Robert Freeman-Day https://launchpad.net/~presgas GPG Public Key: http://keyserver.ubuntu.com:11371/pks/lookup?op=getsearch=0xBA9DF9ED3E4C7D36 -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkx/ujIACgkQup357T5MfTY2fACfcfIL6XNp/XzqZewmYgF7tAc6 95MAn168L6/23Pg0YEUoETESBnEUX5sR =epmH -END PGP SIGNATURE- -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] samba4 eventually stops working
I'm running samba4 from git (latest as of sep 1) on ubuntu 10.4. It's operating as a PDC, as well as hosting a shared drive. The last couple days I've noticed that my shared drives will appear as disconnected, and indeed trying to connect to the server times out. If I look on the server, there are many (50ish) samba processes all sitting there sleeping. If I use the init script to shutdown samba, one of those processes will remain. I need to kill -9 it to make it go away. Then I can restart samba and everything is happy again. I'm not sure what exactly causes it, but I suspect it has to do with my profile that syncs for a while, then starts giving errors in the event log of the network resource going away. So perhaps under the load of my profile sync something fails, hanging all the samba processes. My samba was configured with configure.developer, so I assume I have a lot of debugging available somehow, but I'm not even sure where to start. Thanks. -Aaron -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] samba slow and several Write andx Request
On Thu, Sep 2, 2010 at 5:51 AM, Luca Ferrari fluca1...@infinito.it wrote: Hi all, I'm running version 3.0.28a on Ubuntu linux, and apparently from a day to another I got performance issues: without any change in smb.conf (except a few added shares) I have mac osx and linux clients getting a very slow upload/download speed. I've checked with other protocols, like scp and performances are good, so I can exclude a network/hardware problem. Other clients are still running fast (e.g., windows xp). Looking at a transmission dump I see a lot of Write Andx Request packages (and replies) all moving the data offset by 64 bytes, that I suspect is the cause for the slowing down speed. Is there some option or somehting I can investigate more? Was it always like that or is this something new? That's a really old version of Samba to be running on Ubuntu seems like you might be running also a very old version of ubuntu itself. Ubuntu 9.10 was running 3.4.0 as I recall and 10.04 is on 3.4.7 3.0.28 is not even recommended for windows 7 http://wiki.samba.org/index.php/Windows7 so you will soon hit that wall as well. Perhaps the issues you are having are fixed in later releases? -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] samba slow and several Write andx Request
On Thu, Sep 02, 2010 at 11:40:55AM -0700, grant little wrote: That's a really old version of Samba to be running on Ubuntu seems like you might be running also a very old version of ubuntu itself. Ubuntu 9.10 was running 3.4.0 as I recall and 10.04 is on 3.4.7 3.0.28 is not even recommended for windows 7 http://wiki.samba.org/index.php/Windows7 so you will soon hit that wall as well. Perhaps the issues you are having are fixed in later releases? Not sure. This looks like missing oplocks. Volker -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] CTDB fails to set routes
I've seen some minimal traffic on this issue but no resolution or cause. OS: CentOS 5.5, kernel 2.6.18-194.8.1.el5 ctdb: 1.0.114.0.298 From the CTDB scripts, docs, website, it's implied that /etc/ctdb/events.d/11.routing should get triggered after a take_ip event. I've configured /etc/ctdb/static-routes and followed the scripts and functions around such that it looks like it should get run but it never does. Additionally, the docs distributed with the source seem to indicate that the numbered prefixes on the event scripts need to be unique. CTDB installed with two 11.* scripts. Assuming they get parsed in some unknown order, it shouldn't matter with the 11.* scripts because the non-applicable one should exit anyway since it doesn't have a matching config file. I would like CTDB to set a route when it takes over an IP for the external (routed) network. IP take-overs and shuffling IPs around the nodes in the cluster works fine. Routes are simply not getting set. Ones that are manually set by me are blown-away whenever an IP takeover happens. Is there something I'm missing for getting the routing event script to trigger? I get the same behavior with CVS builds and the older Enterprise Samba CTDB RPM that appears to be from some time in March. It appears that the simple presence of a correctly formatted /etc/ctdb/static-routes file should be all that's necessary to get the routes event to work. Any info or advice would be warmly welcomed. Thanks, -Jason -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] TDB hash size
Sorry for the widespread distribution, but I cannot find much with regard to documentation on this question. Can anyone think of any issues that would arise from increasing the samba (3.0.33) printing tdb hash size using the following method: rm -f /var/cache/samba/printing/* rm -f /var/spool/samba/* cd /var/cache/samba tdbbackup -s .bck -n 10 nt*.tdb mv ntprinters.tdb.bck ntprinters.tdb mv ntforms.tdb.bck ntforms.tdb mv ntdrivers.tdb.bck ntdrivers.tdb More specifically, does anyone know of a method for calculating the proper hash size required for a specific environment? The issue arose by print queues not being cleared. After the hash sizes of the above tdb's were increased, the problem went away. Thanks, Justin -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] ldap_initialize: Bad parameter to an ldap routine
On Thu, Sep 2, 2010 at 12:25 AM, grant little grantlid...@gmail.com wrote: I searched and found this from Volker in 2007 same error message but the fix didn't fix in my case: http://lists.samba.org/archive/samba/2007-March/130093.html my system: ubuntu 10.04 LTS server samba 3.4.7 error: [2010/09/01 23:57:17, 5] winbindd/idmap.c:169(smb_register_idmap) Successfully added idmap backend 'ldap' [2010/09/01 23:57:17, 0] lib/smbldap.c:716(smb_ldap_setup_conn) ldap_initialize: Bad parameter to an ldap routine global section of config [global] unix extensions = no disable spoolss = Yes name resolve order = hosts workgroup = AD realm = AD.MYDOMAIN server string = %h server (Samba, Ubuntu) dns proxy = no log file = /var/log/samba/log.%m max log size = 1000 syslog = 0 log level = 3 passdb:0 auth:0 vfs:0 idmap:5 ldap debug level = 10 ldap debug threshold = 5 panic action = /usr/share/samba/panic-action %d security = ads kerberos method = system keytab encrypt passwords = true passdb backend = ldapsam:ldaps://ldap.ad.mydomain/ ldap ssl = off ldap admin dn = CN=ucenters-ldap,ou=users,OU=UCenters,DC=AD,DC=MYDOMAIN,DC=MYTLD obey pam restrictions = yes unix password sync = yes pam password change = no map to guest = bad user winbind enum groups = yes winbind enum users = yes idmap backend = ldap:ldap_url = ldaps://ldap.ad.mydomain/ idmap uid = 1-199 idmap gid = 1-199 idmap alloc backend = ldap idmap alloc config : ldap_url = ldaps://ldap.ad.mydomain/ idmap alloc config : ldap_base_dn = OU=Users,OU=UCenters,DC=AD,DC=MYDOMAIN,DC=MYTLD usershare allow guests = no Any hints? Thanks. my test command is wbinfo --uid-info 1064262 OK after many permutations and combinations found it didn't like the line: idmap backend = ldap:ldap_url = ldaps://ldap.ad.mydomain/ but was happy with idmap backend = ldap:ldaps://ldap.ad.mydomain/ now it fails on [2010/09/02 13:34:15, 3] lib/smbldap.c:1101(smbldap_connect_system) ldap_connect_system: successful connection to the LDAP server [2010/09/02 13:34:15, 3] winbindd/idmap_ldap.c:1014(idmap_ldap_unixids_to_sids) Failure looking up ids (No such object) I've searched for that error (no hits) and looked at the source but am no wiser. any hints for that latest error? Could it be that ubuntu 10.04 samba 3.4.7 comes without ldapsam? -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
[Samba] Strange provisioning error - I really expect an answer
Hello All, I'm trying to contribute with my tests and continuous attempts to install and stress-test samba, but it gets really sad and frustrating finding out that no one answers. I know a lot of we do this for free, we do this in our free time, wait longer for an answer and that will come, save some typing and please, do not reply with that. I've contributed videos to the comunity and material so that it gets tested more, but I have many unanswered questions. Like whe I tried dynamic updates, and tried to join a W2k8 server to samba4 domain, as Tridge, showed on his video he never got that cannot determine if DNS server supports dynamic updates, it remains unsolved for me and unanswered. It'dbe nice to see how Tridge had his DNS setup?, did he run dhcpd on that same machine?, did he create dns zones manually?. I hope this time I get a chance. I installed samab 4 from git, and compiled it with no errors, provisioned and it worked, then I deleted the whole /usr/local/samab dir because I screwed it up with a failed attempt of joining a w2k8 R2 machine to the domain, decided to re-provision and I'm getting this error: [r...@gateway source4]# ./setup/provision --realm=samba.dghvoip.com--domain=DGHVOIP --adminpass=dgh2...@dm--server-role='domain controller' --host-name=gateway --host-ip=192.168.254.254 Traceback (most recent call last): File ./setup/provision, line 253, in ? useeadb=eadb, next_rid=opts.next_rid) File bin/python/samba/provision.py, line 1350, in provision users_gid = findnss_gid([users or users, 'users', 'other', 'staff']) File bin/python/samba/provision.py, line 333, in lambda findnss_gid = lambda names: findnss(grp.getgrnam, names)[2] File bin/python/samba/provision.py, line 329, in findnss raise KeyError(Unable to find user/group in %r % names) KeyError: Unable to find user/group in ['users', 'users', 'other', 'staff'] Also when I issue make quicktest, before installing this shows Waf: Leaving directory `/data/samba-master/source4/bin' 'build' finished successfully (29.068s) test: running (/usr/bin/perl ../selftest/selftest.pl --prefix=./st --builddir=. --srcdir=. --exclude=./selftest/skip --testlist=./selftest/tests.sh| --exclude=./selftest/slow --quick --include=./selftest/quick --socket-wrapper touch ./st/st_done) | /usr/bin/python -u ../selftest/filter-subunit --expected-failures=./selftest/knownfail | tee ./st/subunit | /usr/bin/python -u ../selftest/format-subunit --prefix=./st --immediate tee: ./st/subunit: No such file or directory SOCKET_WRAPPER_DIR=/data/samba-master/source4/st/w Version 4.0.0alpha12-GIT-4ca9683 OPTIONS --configfile=$SMB_CONF_PATH --maximum-runtime=1200 --target=samba4 --basedir=/data/samba-master/source4/st/s4client --option=torture:progress=no --format=subunit --option=torture:quick=yes Traceback (most recent call last): File ./setup/provision, line 253, in ? useeadb=eadb, next_rid=opts.next_rid) File bin/python/samba/provision.py, line 1350, in provision users_gid = findnss_gid([users or users, 'users', 'other', 'staff']) File bin/python/samba/provision.py, line 333, in lambda findnss_gid = lambda names: findnss(grp.getgrnam, names)[2] File bin/python/samba/provision.py, line 329, in findnss raise KeyError(Unable to find user/group in %r % names) KeyError: Unable to find user/group in ['users', 'users', 'other', 'staff'] Unable to provision: NSS_WRAPPER_PASSWD=/data/samba-master/source4/st/dc/etc/passwd NSS_WRAPPER_GROUP=/data/samba-master/source4/st/dc/etc/group ./setup/provision --configfile=/data/samba-master/source4/st/dc/etc/smb.conf --host-name=localdc --host-ip=127.0.0.1 --quiet --domain=SAMBADOMAIN --realm=SAMBA.EXAMPLE.COM --adminpass=locDCpass1 --krbtgtpass=krbtgtlocDCpass1 --machinepass=machinelocDCpass1 --root=root --server-role=domain controller --function-level=2008 PROVISIONING DC... A summary with detailed information can be found in: ./st/summary ALL OK (0 tests in 0 testsuites) ERROR: test command failed to complete make: *** [quicktest] Error 1 If you could please, give me some hint it'd be greatly appreciated. Thanks again. --- David Gonzalez H. DGHVoIP - OPEN SOURCE TELEPHONY SOLUTIONS Phone Bogotá: +(57-1)289-1168 Phone Medellin: +(57-4)247-0985 Mobile: +(57)315-838-8326 MSN: da...@planetaradio.net Skype: davidgonzalezh WEB: http://www.dghvoip.com/ Proud Linux User #294661 -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] samba-3.5.4: compilation fails on RHAS5U5
Grab and review the RPM's from http://download.samba.org/samba/ftp/Binary_Packages/RedHat/. On Wed, Sep 1, 2010 at 8:37 AM, Werner Maes werner.m...@icts.kuleuven.be wrote: hello I tried to compile samba on Redhat AS5U5 but it fails with this message: Install: cannot stat `source3/bin/umount.cifs': No such file or directory. Any solution? kind regards werner maes -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] enable client to join domain with no or any password?
David Mathog wrote: Jean-Jacques Moulis wrote: On Tue, 17 Aug 2010 13:33:25 -0700 David Mathog mat...@caltech.edu wrote: DM I am trying to automate W7 joining to our Samba domain. It works fine DM through the Windows GUI from the W7 workstations. However, for a script DM one would have to store password used for domain access, and since that DM is the server's root password, I really don't want to hard code that DM into a file. Grant the right to put a machine in the domain to a special user with no other privileges on the PDC or on the clients. That worked as you said for the server side. The /etc/passwd entry ends in /sbin/nologon, and as far as I can tell, that locks it out from both su and ssh. I spoke too soon. This special account works fine for the UnjoinDomainOrWorkgroup method. However, it fails every single time for the JoinDomainOrWorkgroup method, in every case resulting in a 1326 status. It didn't matter if the machine account existed, existed and was unchanged (unjoin, reboot, join), or didn't exist. All of the same JoinDomainOrWorkgroup operations succeed if I use root with the password for root that is in smbpasswd. Details about the special account: % net rpc rights list sjacct Enter root's password: SeMachineAccountPrivilege % grep sjacct /etc/passwd sjacct:x:82:13:SMB JOIN account:/var/empty:/sbin/nologin % grep 13 /etc/group news:x:13: This is as buttoned down security wise on the linux side as I could make it. Seems like samba really needs this account to do something on the server, and it cannot. Samba is 3.4.7-0.2mdv2008.1 Any suggestions? Thanks, David Mathog mat...@caltech.edu Manager, Sequence Analysis Facility, Biology Division, Caltech -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] enable client to join domain with no or any password?
More information. For the restricted access sjacct of the preceding post, it WILL join/unjoin correctly using the System control panel (this is on XP). It just doesn't join using those credentials in Powershell. Here are the two commands: $CI=Get-WmiObject win32_ComputerSystem -Authentication 6 $CI.JoinDomainOrWorkgroup(SAF,password,sjacct,,35) The second always comes back with 1326. It does so if the last parameter is 1,3,33, or 35 and if the third is sjacct or SAF\sjacct. But it will unjoin from within powershell, as this works: $CI.UnjoinDomainOrWorkgroup(password,sjacct) Conversely both Unjoin and JoinDomainOrWorkgroup work correctly for user root. Very frustrating! Thanks, David Mathog mat...@caltech.edu Manager, Sequence Analysis Facility, Biology Division, Caltech -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Re: [Samba] Domain not available even minutes after workstation startup
Just an update, disabling media sensing (fix to 100Mb full duplex) seems to do the trick! Interestingly, those with gigabit connection seems to work now (at least for last few days) even with auto-sensing enabled... really not sure why. I hope that is going to last. thx Gaiseric Abe On Wed, Sep 1, 2010 at 2:38 PM, Abe Lau abelau+sa...@gmail.comabelau%2bsa...@gmail.com wrote: No, I have never try anything with media sensing. I could give it a try and see if it helps. Thanks for checking that for me Gaiseric. I am not using roaming profile here also, just folder redirection for the desktop, My Documents, Application Data and a few... I may try to re-enable Winlogoncachedlogonscount so that user could still logon. But then, it will get back to the problem as the login may get totally stuck when XP is trying to contact the PDC for the login script at netlogon, and redirected folders. Abe On Wed, Sep 1, 2010 at 12:50 PM, Gaiseric Vandal gaiseric.van...@gmail.com wrote: Did you try disabling the media sensing feature? I need to look at some of my Active Directory XP clients and see if they are still getting the error. I don’t think it prevented people logging on, and I am not using roaming profiles, so even if I still have this issue on occasion it might not be obvious. I think I had run into it when trying to deploy software through group policies.This was a few years ago but I think I had got it resolved. You could try putting one of the problem XP machines on a 10 Mbit only link. Or maybe see if you can configure the NIC settings be be 10 Mbit OR 100 Mbit but not autosensing. *From:* abe...@gmail.com [mailto:abe...@gmail.com] *On Behalf Of *Abe Lau *Sent:* Tuesday, August 31, 2010 8:22 PM *To:* gaiseric.van...@gmail.com *Cc:* samba@lists.samba.org *Subject:* Re: [Samba] Domain not available even minutes after workstation startup Thanks Gaiseric for the note. I checked the XP Event Log, and the only error is: Automatic certificate enrollment for local system failed to contact the active directory (0x8007054b). The specified domain either does not exist or could not be contacted. Enrollment will not be performed. For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp. The only suspicious entry in samba log: (I remember this could safely be ignored) [2010/09/01 09:10:17, 1] smbd/session.c:111(session_claim) Re-using invalid record The PDC was changed to connect via two bonded gigabit connection (balance-alb) in a mixed 1000/100 network few months ago. Contrary to the MS support link, we have problem with both 100Mbps and 1000Mbps connections intermittently. Is any way to get XP to split out detailed log when it says domain is not available? Is setting Winlogoncachedlogonscount the good way to avoid logon problem when network is not ready during initial bootup? According to MS, if the domain server is not available and logon data is not cached, domain is not available will occur. http://technet.microsoft.com/en-us/library/cc957390.aspx Any further insight? Abe On Tue, Aug 31, 2010 at 10:00 PM, Gaiseric Vandal gaiseric.van...@gmail.com wrote: Did you check the event logs in Windows- they may provide some additional info. This error sounded familiar- most of my users are in a Samba domain, but I have one group that uses Windows 2003 active directory domain. A few years back they had some weird issues that ended up being (possibly) related to the gigabit network connection.It had been hard to trace and had only been affecting newer machines. I think the following link was relevant. http://support.microsoft.com/kb/326152/ On 08/30/2010 11:29 PM, Abe Lau wrote: Yes, the PDC is also acting as the WINS server. The XP workstation is using WINS, set via DHCP (option netbios-name-servers ip address of the PDC;) On Mon, Aug 30, 2010 at 10:43 PM, Gaiseric Vandal gaiseric.van...@gmail.com mailto:gaiseric.van...@gmail.com wrote: Is the PDC also a WINS server? Are the XP workstations using WINS? On 08/29/2010 09:01 PM, Abe Lau wrote: Hi all, I have recently experienced an intermittent problem of getting the error message of Domain not available at initial logon of some XP workstations connected to a Samba PDC. The domain does not seems to be available after some time after initial bootup of the XP workstation, from a minute or two, to more than 10 minutes sometimes. Is there anyway to speed up this process? Thanks! I have set HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogoncachedlogonscount to 0 to workaround the problem of having the logon frozen (and folders not being redirected) during initial logon when the network is not ready. Abe -- To unsubscribe from
Re: [Samba] Implementing Samba4
On Wed, 2010-09-01 at 09:42 +0200, Juan Asensio Sánchez wrote: Hi I am trying to install Samba 4 on a Ubuntu 10.04 Server machine. I have downloaded the sources, compiled it and installed. Now I have to do the provision step. I want to use an existing LDAP server (389 Directory Server) installed in other machine (well, really a lot of machines, yet configured for replication). Also, the servers only accept SSL connections. But all the examples I have seen in the Samba Wiki use ldapi. I have tried a lot of commands to configure the provisioning, but I don't understand what this step does: - Create any special user in the LDAP server? - Create any branches in the LDAP server? - Add any schema? What should be the command to make Samba work with my LDAP servers, with SSL? The LDAP servers also have yet user and group data (also Samba3 domain, but it is not being used). This simply isn't possible. Samba4 uses a different schema (the AD schema). There was an effort by Red Hat to create a system where Samba4 would talk to an LDAP server with a different schema (using schema mapping), but this seems to have been abandoned. http://osdir.com/ml/freeipa-users/2010-08/msg00022.html After the provisioning, I have seen that is needed to start the LDAP server using start-slapd of the Samba package. What? What is this for? This runs the Fedora DS/389 script, to start the instance we configure in the way that we expect. And one last question, is it possible to create interdomain trust with the current version of Samba4? Not yet. (We of course intend to support this, but we don't at this time). Andrew Bartlett -- Andrew Bartletthttp://samba.org/~abartlet/ Authentication Developer, Samba Team http://samba.org Samba Developer, Cisco Inc. signature.asc Description: This is a digitally signed message part -- To unsubscribe from this list go to the following URL and read the instructions: https://lists.samba.org/mailman/options/samba
Build status as of Thu Sep 2 06:00:01 2010
URL: http://build.samba.org/ --- /home/build/master/cache/broken_results.txt.old 2010-09-01 00:00:18.0 -0600 +++ /home/build/master/cache/broken_results.txt 2010-09-02 00:01:04.0 -0600 @@ -1,11 +1,11 @@ -Build status as of Wed Sep 1 06:00:02 2010 +Build status as of Thu Sep 2 06:00:01 2010 Build counts: Tree Total Broken Panic build_farm 0 0 0 -ccache 32 2 0 +ccache 32 4 0 ccache-maint 30 2 0 -ldb 32 30 0 +ldb 32 12 0 libreplace 32 11 0 lorikeet 0 0 0 pidl 18 18 0 @@ -14,9 +14,9 @@ samba-docs 0 0 0 samba-web0 0 0 samba_3_current 32 32 4 -samba_3_master 32 31 0 +samba_3_master 32 31 1 samba_3_next 32 32 5 -samba_4_0_waf 36 33 0 -talloc 32 8 0 +samba_4_0_waf 36 32 0 +talloc 32 6 0 tdb 30 8 0
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via ac317eb s3: Remove unused nss_info_adex_init() from 4ca9683 s3-param: added lp_set_cmdline() and --option= parameter http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit ac317eba25ab9d55866523858a5a9c6b1363de1f Author: Volker Lendecke v...@samba.org Date: Thu Sep 2 22:13:59 2010 +0200 s3: Remove unused nss_info_adex_init() --- Summary of changes: source3/winbindd/idmap_adex/idmap_adex.c |5 - 1 files changed, 0 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/winbindd/idmap_adex/idmap_adex.c b/source3/winbindd/idmap_adex/idmap_adex.c index 0902d55..c21e2fd 100644 --- a/source3/winbindd/idmap_adex/idmap_adex.c +++ b/source3/winbindd/idmap_adex/idmap_adex.c @@ -430,8 +430,3 @@ NTSTATUS idmap_adex_init(void) return NT_STATUS_OK; } - -static NTSTATUS nss_info_adex_init(void) -{ - return idmap_adex_init(); -} -- Samba Shared Repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 804aaad s3-kerberos: use krb5 compat macros in fill_keytab_from_password() via d9c63fb Revert s3-kerberos: use krb5 compat macros in fill_keytab_from_password(). from ac317eb s3: Remove unused nss_info_adex_init() http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 804aaad526419e2be9101190bbccf95152f1d4b4 Author: Simo Sorce i...@samba.org Date: Thu Sep 2 16:09:19 2010 -0400 s3-kerberos: use krb5 compat macros in fill_keytab_from_password() This one uses the compat macro in the right way, without actually breaking the code. Signed-off-by: Günther Deschner g...@samba.org commit d9c63fbe9275c0abfc0351cac3669fb52c1c99da Author: Simo Sorce i...@samba.org Date: Thu Sep 2 16:07:00 2010 -0400 Revert s3-kerberos: use krb5 compat macros in fill_keytab_from_password(). This reverts commit 9986d25ed195ee77bd73c96f057c527b4c3a8f03. This patch was causing us to free unallocated memory. Signed-off-by: Günther Deschner g...@samba.org --- Summary of changes: source3/librpc/rpc/dcerpc_krb5.c |7 ++- 1 files changed, 6 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/librpc/rpc/dcerpc_krb5.c b/source3/librpc/rpc/dcerpc_krb5.c index 2d39a45..22443b6 100644 --- a/source3/librpc/rpc/dcerpc_krb5.c +++ b/source3/librpc/rpc/dcerpc_krb5.c @@ -128,7 +128,10 @@ static krb5_error_code fill_keytab_from_password(krb5_context krbctx, for (i = 0; enctypes[i]; i++) { krb5_keyblock *key = NULL; - key = KRB5_KT_KEY(kt_entry); + if (!(key = SMB_MALLOC_P(krb5_keyblock))) { + ret = ENOMEM; + goto out; + } if (create_kerberos_key_from_string(krbctx, princ, password, key, @@ -136,11 +139,13 @@ static krb5_error_code fill_keytab_from_password(krb5_context krbctx, DEBUG(10, (Failed to create key for enctype %d (error: %s)\n, enctypes[i], error_message(ret))); + SAFE_FREE(key); continue; } kt_entry.principal = princ; kt_entry.vno = vno; + *(KRB5_KT_KEY(kt_entry)) = *key; ret = krb5_kt_add_entry(krbctx, keytab, kt_entry); if (ret) { -- Samba Shared Repository
[SCM] CTDB repository - branch 1.2 updated - ctdb-1.0.114-320-gd9ace01
The branch, 1.2 has been updated via d9ace0124b23ab4fd3db87c908f0562dac845545 (commit) via 799f4ee0d81175337c993006006b5e6c26e11cf1 (commit) from 4a9b8a57e7cc256b167b2d51d3797e23951e (commit) http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=1.2 - Log - commit d9ace0124b23ab4fd3db87c908f0562dac845545 Author: Ronnie Sahlberg ronniesahlb...@gmail.com Date: Fri Sep 3 11:58:27 2010 +1000 When memory allocations for recovery fails, dont dereference a null pointer while trying to print the log message for the failure. also shutdown ctdb with ctdb_fatal() commit 799f4ee0d81175337c993006006b5e6c26e11cf1 Author: Harald Klatte kla...@hrz.uni-kassel.de Date: Mon Aug 30 10:40:43 2010 +0200 AIX bind wants the correct addrsize --- Summary of changes: common/system_common.c |5 - server/ctdb_recover.c |6 ++ 2 files changed, 6 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/common/system_common.c b/common/system_common.c index 9aa4620..f28045f 100644 --- a/common/system_common.c +++ b/common/system_common.c @@ -50,13 +50,16 @@ bool ctdb_sys_have_ip(ctdb_sock_addr *_addr) int ret; ctdb_sock_addr __addr = *_addr; ctdb_sock_addr *addr = __addr; + socklen_t addrlen; switch (addr-sa.sa_family) { case AF_INET: addr-ip.sin_port = 0; + addrlen = sizeof(struct sockaddr_in); break; case AF_INET6: addr-ip6.sin6_port = 0; + addrlen = sizeof(struct sockaddr_in6); break; } @@ -65,7 +68,7 @@ bool ctdb_sys_have_ip(ctdb_sock_addr *_addr) return false; } - ret = bind(s, (struct sockaddr *)addr, sizeof(ctdb_sock_addr)); + ret = bind(s, (struct sockaddr *)addr, addrlen); close(s); return ret == 0; diff --git a/server/ctdb_recover.c b/server/ctdb_recover.c index e1c7b16..81e2d4b 100644 --- a/server/ctdb_recover.c +++ b/server/ctdb_recover.c @@ -340,10 +340,8 @@ static int traverse_pulldb(struct tdb_context *tdb, TDB_DATA key, TDB_DATA data, } params-pulldata = talloc_realloc_size(NULL, params-pulldata, rec-length + params-len); if (params-pulldata == NULL) { - DEBUG(DEBUG_ERR,(__location__ Failed to expand pulldb_data to %u (%u records)\n, -rec-length + params-len, params-pulldata-count)); - params-failed = true; - return -1; + DEBUG(DEBUG_CRIT,(__location__ Failed to expand pulldb_data to %u\n, rec-length + params-len)); + ctdb_fatal(params-ctdb, failed to allocate memory for recovery. shutting down\n); } params-pulldata-count++; memcpy(params-len+(uint8_t *)params-pulldata, rec, rec-length); -- CTDB repository
[SCM] CTDB repository - branch master updated - ctdb-1.0.114-302-gf8642d0
The branch, master has been updated via f8642d0438c6bbb34a72c25d6a904b626e247410 (commit) via b5169e037fe113a5b62f510646b8fefc055c053b (commit) from 96cbd2c0aa9a4641a42b3c33374675fa732ed1e5 (commit) http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master - Log - commit f8642d0438c6bbb34a72c25d6a904b626e247410 Author: Ronnie Sahlberg ronniesahlb...@gmail.com Date: Fri Sep 3 11:58:27 2010 +1000 When memory allocations for recovery fails, dont dereference a null pointer while trying to print the log message for the failure. also shutdown ctdb with ctdb_fatal() commit b5169e037fe113a5b62f510646b8fefc055c053b Author: Harald Klatte kla...@hrz.uni-kassel.de Date: Mon Aug 30 10:40:43 2010 +0200 AIX bind wants the correct addrsize --- Summary of changes: common/system_common.c |5 - server/ctdb_recover.c |6 ++ 2 files changed, 6 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/common/system_common.c b/common/system_common.c index 9aa4620..f28045f 100644 --- a/common/system_common.c +++ b/common/system_common.c @@ -50,13 +50,16 @@ bool ctdb_sys_have_ip(ctdb_sock_addr *_addr) int ret; ctdb_sock_addr __addr = *_addr; ctdb_sock_addr *addr = __addr; + socklen_t addrlen; switch (addr-sa.sa_family) { case AF_INET: addr-ip.sin_port = 0; + addrlen = sizeof(struct sockaddr_in); break; case AF_INET6: addr-ip6.sin6_port = 0; + addrlen = sizeof(struct sockaddr_in6); break; } @@ -65,7 +68,7 @@ bool ctdb_sys_have_ip(ctdb_sock_addr *_addr) return false; } - ret = bind(s, (struct sockaddr *)addr, sizeof(ctdb_sock_addr)); + ret = bind(s, (struct sockaddr *)addr, addrlen); close(s); return ret == 0; diff --git a/server/ctdb_recover.c b/server/ctdb_recover.c index e1c7b16..81e2d4b 100644 --- a/server/ctdb_recover.c +++ b/server/ctdb_recover.c @@ -340,10 +340,8 @@ static int traverse_pulldb(struct tdb_context *tdb, TDB_DATA key, TDB_DATA data, } params-pulldata = talloc_realloc_size(NULL, params-pulldata, rec-length + params-len); if (params-pulldata == NULL) { - DEBUG(DEBUG_ERR,(__location__ Failed to expand pulldb_data to %u (%u records)\n, -rec-length + params-len, params-pulldata-count)); - params-failed = true; - return -1; + DEBUG(DEBUG_CRIT,(__location__ Failed to expand pulldb_data to %u\n, rec-length + params-len)); + ctdb_fatal(params-ctdb, failed to allocate memory for recovery. shutting down\n); } params-pulldata-count++; memcpy(params-len+(uint8_t *)params-pulldata, rec, rec-length); -- CTDB repository
[SCM] CTDB repository - branch 1.0.112 updated - ctdb-1.0.111-142-g16a5cad
The branch, 1.0.112 has been updated via 16a5cad37fa9093beb3ab5e4c24bbd61056c89f8 (commit) via 35b719c8e2d97ec7014401a132937a01a1f2da7f (commit) from d0c57b915d225bcf4c924ff57df7abb99b3ebfd1 (commit) http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=1.0.112 - Log - commit 16a5cad37fa9093beb3ab5e4c24bbd61056c89f8 Author: Ronnie Sahlberg ronniesahlb...@gmail.com Date: Fri Sep 3 11:58:27 2010 +1000 When memory allocations for recovery fails, dont dereference a null pointer while trying to print the log message for the failure. also shutdown ctdb with ctdb_fatal() commit 35b719c8e2d97ec7014401a132937a01a1f2da7f Author: Rusty Russell ru...@rustcorp.com.au Date: Thu Sep 2 12:44:21 2010 +0930 eventscript: make sure we die when we timeout. Volker noticed that system() can hang on a futex: we do this inside a signal handler simply to dump extra diagnostics when we timeout, which is very questionable but usually works. Add a timeout of 90 seconds: after that, commit suicide. (This is a workaround for this branch: master does this correctly). Signed-off-by: Rusty Russell ru...@rustcorp.com.au --- Summary of changes: server/ctdb_recover.c |6 ++ server/eventscript.c | 13 + 2 files changed, 15 insertions(+), 4 deletions(-) Changeset truncated at 500 lines: diff --git a/server/ctdb_recover.c b/server/ctdb_recover.c index f61b6e7..b48b4e7 100644 --- a/server/ctdb_recover.c +++ b/server/ctdb_recover.c @@ -340,10 +340,8 @@ static int traverse_pulldb(struct tdb_context *tdb, TDB_DATA key, TDB_DATA data, } params-pulldata = talloc_realloc_size(NULL, params-pulldata, rec-length + params-len); if (params-pulldata == NULL) { - DEBUG(DEBUG_ERR,(__location__ Failed to expand pulldb_data to %u (%u records)\n, -rec-length + params-len, params-pulldata-count)); - params-failed = true; - return -1; + DEBUG(DEBUG_CRIT,(__location__ Failed to expand pulldb_data to %u\n, rec-length + params-len)); + ctdb_fatal(params-ctdb, failed to allocate memory for recovery. shutting down\n); } params-pulldata-count++; memcpy(params-len+(uint8_t *)params-pulldata, rec, rec-length); diff --git a/server/eventscript.c b/server/eventscript.c index c403772..37306db 100644 --- a/server/eventscript.c +++ b/server/eventscript.c @@ -34,6 +34,13 @@ static struct { static void ctdb_event_script_timeout(struct event_context *ev, struct timed_event *te, struct timeval t, void *p); +static void sigalarm(int sig) +{ + /* all the child processes will be running in the same process group */ + kill(-getpgrp(), SIGKILL); + _exit(1); +} + /* ctdbd sends us a SIGTERM when we should time out the current script */ @@ -42,6 +49,12 @@ static void sigterm(int sig) char tbuf[100], buf[200]; time_t t; + /* Calling system() inside a signal handler can do strange things: +* it usually works, and that's enough for us: it's only for debugging. +* But make sure we terminate. */ + signal(SIGTERM, sigalarm); + alarm(90); + DEBUG(DEBUG_ERR,(Timed out running script '%s' after %.1f seconds pid :%d\n, child_state.script_running, timeval_elapsed(child_state.start), getpid())); -- CTDB repository
[SCM] Samba Shared Repository - branch master updated
The branch, master has been updated via 0bc53f7 pidl: Keep only a single copy of samba.dcerpc.base.ClientConnection. via c5449c9 pidl: Factor out generation of interface type name. from 804aaad s3-kerberos: use krb5 compat macros in fill_keytab_from_password() http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log - commit 0bc53f7d9f9af5379422811347e80beb0318b673 Author: Jelmer Vernooij jel...@samba.org Date: Fri Sep 3 02:39:38 2010 +0200 pidl: Keep only a single copy of samba.dcerpc.base.ClientConnection. commit c5449c929841817ac76197b4fc8c6792b9dc3204 Author: Jelmer Vernooij jel...@samba.org Date: Fri Sep 3 00:35:29 2010 +0200 pidl: Factor out generation of interface type name. --- Summary of changes: pidl/lib/Parse/Pidl/Samba4/Python.pm | 47 -- source4/lib/messaging/pymessaging.c|2 +- source4/librpc/rpc/pyrpc.c | 177 +-- source4/librpc/rpc/pyrpc.h | 29 --- source4/librpc/rpc/pyrpc_util.c| 183 +++- source4/librpc/rpc/pyrpc_util.h| 30 source4/librpc/wscript_build | 54 +++ .../scripting/python/samba/tests/dcerpc/rpcecho.py |2 +- 8 files changed, 280 insertions(+), 244 deletions(-) Changeset truncated at 500 lines: diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm index e9956d3..715a400 100644 --- a/pidl/lib/Parse/Pidl/Samba4/Python.pm +++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm @@ -25,7 +25,8 @@ sub new($) { my $self = { res = , res_hdr = , tabs = , constants = {}, module_methods = [], module_objects = [], ready_types = [], module_imports = [], type_imports = {}, -patch_type_calls = [], readycode = [] }; +patch_type_calls = [], prereadycode = [], +postreadycode = []}; bless($self, $class); } @@ -712,12 +713,13 @@ sub Interface($$$) $docstring = $signature; } - $self-pidl(static PyTypeObject $interface-{NAME}_InterfaceType = {); + my $if_typename = $interface-{NAME}_InterfaceType; + + $self-pidl(static PyTypeObject $if_typename = {); $self-indent; $self-pidl(PyObject_HEAD_INIT(NULL) 0,); $self-pidl(.tp_name = \$basename.$interface-{NAME}\,); $self-pidl(.tp_basicsize = sizeof(dcerpc_InterfaceObject),); - $self-pidl(.tp_base = dcerpc_InterfaceType,); $self-pidl(.tp_doc = $docstring,); $self-pidl(.tp_flags = Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,); $self-pidl(.tp_new = interface_$interface-{NAME}_new,); @@ -726,8 +728,10 @@ sub Interface($$$) $self-pidl(); - $self-register_module_typeobject($interface-{NAME}, $interface-{NAME}_InterfaceType); - $self-register_module_readycode([if (!PyInterface_AddNdrRpcMethods($interface-{NAME}_InterfaceType, py_ndr_$interface-{NAME}\_methods)), \treturn;, ]); + $self-register_module_typeobject($interface-{NAME}, $if_typename); + my $dcerpc_typename = $self-import_type_variable(base, ClientConnection); + $self-register_module_prereadycode([$if_typename.tp_base = $dcerpc_typename;, ]); + $self-register_module_postreadycode([if (!PyInterface_AddNdrRpcMethods($if_typename, py_ndr_$interface-{NAME}\_methods)), \treturn;, ]); } $self-pidl_hdr(\n); @@ -764,6 +768,17 @@ sub register_module_import($$) push (@{$self-{module_imports}}, $basename) unless (grep(/^$basename$/,@{$self-{module_imports}})); } +sub import_type_variable($$$) +{ + my ($self, $module, $name) = @_; + + $self-register_module_import($module); + unless (defined($self-{type_imports}-{$name})) { + $self-{type_imports}-{$name} = $module; + } + return $name\_Type; +} + sub use_type_variable($$) { my ($self, $orig_ctype) = @_; @@ -778,11 +793,7 @@ sub use_type_variable($$) } # If this is an external type, make sure we do the right imports. if (($ctype-{BASEFILE} ne $self-{BASENAME})) { - $self-register_module_import($ctype-{BASEFILE}); - unless (defined($self-{type_imports}-{$ctype-{NAME}})) { - $self-{type_imports}-{$ctype-{NAME}} = $ctype-{BASEFILE}; - } - return $ctype-{NAME}_Type; + return $self-import_type_variable($ctype-{BASEFILE}, $ctype-{NAME}); } return $ctype-{NAME}_Type; } @@
[SCM] CTDB repository - branch master updated - ctdb-1.0.114-303-g516423c
The branch, master has been updated via 516423c25afa9861d9988096efa8a4a2b12b31b1 (commit) from f8642d0438c6bbb34a72c25d6a904b626e247410 (commit) http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master - Log - commit 516423c25afa9861d9988096efa8a4a2b12b31b1 Author: Ronnie Sahlberg ronniesahlb...@gmail.com Date: Fri Sep 3 12:35:25 2010 +1000 Dont store temporary runtime data in $CTDB_BASE/state since that will usually be /etc/ctdb/state and storing this under /etc is just wrong. Add a new variable CTDB_VARDIR that defaults to /var/ctdb and store the data there instead. --- Summary of changes: config/ctdb.init |4 +++ config/events.d/00.ctdb | 16 +++--- config/events.d/13.per_ip_routing |2 +- config/events.d/20.multipathd |4 +- config/events.d/50.samba | 14 ++-- config/events.d/60.nfs| 10 config/events.d/62.cnfs |2 +- config/events.d/README|4 +- config/functions | 14 ++-- config/statd-callout | 42 10 files changed, 60 insertions(+), 52 deletions(-) Changeset truncated at 500 lines: diff --git a/config/ctdb.init b/config/ctdb.init index fc66ab2..25e158f 100755 --- a/config/ctdb.init +++ b/config/ctdb.init @@ -39,6 +39,10 @@ unset TMPDIR export CTDB_BASE=/etc/ctdb } +[ -z $CTDB_VARDIR ] { +export CTDB_VARDIR=/var/ctdb +} + . $CTDB_BASE/functions loadconfig network loadconfig ctdb diff --git a/config/events.d/00.ctdb b/config/events.d/00.ctdb index 7e9e386..8ff6488 100755 --- a/config/events.d/00.ctdb +++ b/config/events.d/00.ctdb @@ -15,10 +15,10 @@ loadconfig case $1 in init) # make sure we have a blank state directory for the scripts to work with - /bin/rm -rf $CTDB_BASE/state - /bin/mkdir -p $CTDB_BASE/state || { + /bin/rm -rf $CTDB_VARDIR/state + /bin/mkdir -p $CTDB_VARDIR/state || { ret=$? - echo /bin/mkdir -p $CTDB_BASE/state - failed - $ret + echo /bin/mkdir -p $CTDB_VARDIR/state - failed - $ret exit $ret } ;; @@ -37,15 +37,15 @@ case $1 in startup) # Pull optional ctdb configuration data out of config.tdb PUBLICADDRESSESKEY='public-addresses:node#'`ctdb -t 1 xpnn|sed -e s/.*://` - rm -f $CTDB_BASE/state/public_addresses - ctdb pfetch config.tdb $PUBLICADDRESSESKEY $CTDB_BASE/state/public_addresses + rm -f $CTDB_VARDIR/state/public_addresses + ctdb pfetch config.tdb $PUBLICADDRESSESKEY $CTDB_VARDIR/state/public_addresses [ $? = 0 ] [ `stat --format=%s /etc/ctdb/state/public_addresses` != 0 ] [ ! -z $CTDB_PUBLIC_ADDRESSES ] { - diff $CTDB_BASE/state/public_addresses $CTDB_PUBLIC_ADDRESSES /dev/null 2/dev/null + diff $CTDB_VARDIR/state/public_addresses $CTDB_PUBLIC_ADDRESSES /dev/null 2/dev/null [ $? = 0 ] || { echo CTDB public address configuration had been updated. echo Extracting new configuration from database. - diff $CTDB_BASE/state/public_addresses $CTDB_PUBLIC_ADDRESSES - cp $CTDB_BASE/state/public_addresses $CTDB_PUBLIC_ADDRESSES + diff $CTDB_VARDIR/state/public_addresses $CTDB_PUBLIC_ADDRESSES + cp $CTDB_VARDIR/state/public_addresses $CTDB_PUBLIC_ADDRESSES echo Restarting CTDB service ctdb restart } diff --git a/config/events.d/13.per_ip_routing b/config/events.d/13.per_ip_routing index 6b51b05..c734bbc 100755 --- a/config/events.d/13.per_ip_routing +++ b/config/events.d/13.per_ip_routing @@ -4,7 +4,7 @@ loadconfig [ -z $CTDB_PER_IP_ROUTING_STATE ] { - CTDB_PER_IP_ROUTING_STATE=$CTDB_BASE/state/per_ip_routing + CTDB_PER_IP_ROUTING_STATE=$CTDB_VARDIR/state/per_ip_routing } AUTO_LINK_LOCAL=no diff --git a/config/events.d/20.multipathd b/config/events.d/20.multipathd index 091a773..2f484a4 100644 --- a/config/events.d/20.multipathd +++ b/config/events.d/20.multipathd @@ -16,7 +16,7 @@ loadconfig exit 0 } -MPFAILURE=$CTDB_BASE/state/multipathd/failure +MPFAILURE=$CTDB_VARDIR/state/multipathd/failure multipathd_check_background() { @@ -78,7 +78,7 @@ case $1 in startup) # create a state directory to keep/track the multipath device # state - /bin/mkdir -p $CTDB_BASE/state/multipathd + /bin/mkdir -p $CTDB_VARDIR/state/multipathd exit 0 ;; diff --git a/config/events.d/50.samba b/config/events.d/50.samba index 23dd060..047f9e0 100755 --- a/config/events.d/50.samba +++ b/config/events.d/50.samba @@
[SCM] CTDB repository - branch 1.2 updated - ctdb-1.0.114-321-gc46b9a8
The branch, 1.2 has been updated via c46b9a800af58a604d79d2295540b99335a9f5d9 (commit) from d9ace0124b23ab4fd3db87c908f0562dac845545 (commit) http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=1.2 - Log - commit c46b9a800af58a604d79d2295540b99335a9f5d9 Author: Ronnie Sahlberg ronniesahlb...@gmail.com Date: Fri Sep 3 12:35:25 2010 +1000 Dont store temporary runtime data in $CTDB_BASE/state since that will usually be /etc/ctdb/state and storing this under /etc is just wrong. Add a new variable CTDB_VARDIR that defaults to /var/ctdb and store the data there instead. --- Summary of changes: config/ctdb.init |4 +++ config/events.d/00.ctdb | 16 +++--- config/events.d/13.per_ip_routing |2 +- config/events.d/20.multipathd |4 +- config/events.d/50.samba | 14 ++-- config/events.d/60.nfs| 10 config/events.d/62.cnfs |2 +- config/events.d/README|4 +- config/functions | 14 ++-- config/statd-callout | 42 10 files changed, 60 insertions(+), 52 deletions(-) Changeset truncated at 500 lines: diff --git a/config/ctdb.init b/config/ctdb.init index fc66ab2..25e158f 100755 --- a/config/ctdb.init +++ b/config/ctdb.init @@ -39,6 +39,10 @@ unset TMPDIR export CTDB_BASE=/etc/ctdb } +[ -z $CTDB_VARDIR ] { +export CTDB_VARDIR=/var/ctdb +} + . $CTDB_BASE/functions loadconfig network loadconfig ctdb diff --git a/config/events.d/00.ctdb b/config/events.d/00.ctdb index 7e9e386..8ff6488 100755 --- a/config/events.d/00.ctdb +++ b/config/events.d/00.ctdb @@ -15,10 +15,10 @@ loadconfig case $1 in init) # make sure we have a blank state directory for the scripts to work with - /bin/rm -rf $CTDB_BASE/state - /bin/mkdir -p $CTDB_BASE/state || { + /bin/rm -rf $CTDB_VARDIR/state + /bin/mkdir -p $CTDB_VARDIR/state || { ret=$? - echo /bin/mkdir -p $CTDB_BASE/state - failed - $ret + echo /bin/mkdir -p $CTDB_VARDIR/state - failed - $ret exit $ret } ;; @@ -37,15 +37,15 @@ case $1 in startup) # Pull optional ctdb configuration data out of config.tdb PUBLICADDRESSESKEY='public-addresses:node#'`ctdb -t 1 xpnn|sed -e s/.*://` - rm -f $CTDB_BASE/state/public_addresses - ctdb pfetch config.tdb $PUBLICADDRESSESKEY $CTDB_BASE/state/public_addresses + rm -f $CTDB_VARDIR/state/public_addresses + ctdb pfetch config.tdb $PUBLICADDRESSESKEY $CTDB_VARDIR/state/public_addresses [ $? = 0 ] [ `stat --format=%s /etc/ctdb/state/public_addresses` != 0 ] [ ! -z $CTDB_PUBLIC_ADDRESSES ] { - diff $CTDB_BASE/state/public_addresses $CTDB_PUBLIC_ADDRESSES /dev/null 2/dev/null + diff $CTDB_VARDIR/state/public_addresses $CTDB_PUBLIC_ADDRESSES /dev/null 2/dev/null [ $? = 0 ] || { echo CTDB public address configuration had been updated. echo Extracting new configuration from database. - diff $CTDB_BASE/state/public_addresses $CTDB_PUBLIC_ADDRESSES - cp $CTDB_BASE/state/public_addresses $CTDB_PUBLIC_ADDRESSES + diff $CTDB_VARDIR/state/public_addresses $CTDB_PUBLIC_ADDRESSES + cp $CTDB_VARDIR/state/public_addresses $CTDB_PUBLIC_ADDRESSES echo Restarting CTDB service ctdb restart } diff --git a/config/events.d/13.per_ip_routing b/config/events.d/13.per_ip_routing index 6b51b05..c734bbc 100755 --- a/config/events.d/13.per_ip_routing +++ b/config/events.d/13.per_ip_routing @@ -4,7 +4,7 @@ loadconfig [ -z $CTDB_PER_IP_ROUTING_STATE ] { - CTDB_PER_IP_ROUTING_STATE=$CTDB_BASE/state/per_ip_routing + CTDB_PER_IP_ROUTING_STATE=$CTDB_VARDIR/state/per_ip_routing } AUTO_LINK_LOCAL=no diff --git a/config/events.d/20.multipathd b/config/events.d/20.multipathd index 091a773..2f484a4 100644 --- a/config/events.d/20.multipathd +++ b/config/events.d/20.multipathd @@ -16,7 +16,7 @@ loadconfig exit 0 } -MPFAILURE=$CTDB_BASE/state/multipathd/failure +MPFAILURE=$CTDB_VARDIR/state/multipathd/failure multipathd_check_background() { @@ -78,7 +78,7 @@ case $1 in startup) # create a state directory to keep/track the multipath device # state - /bin/mkdir -p $CTDB_BASE/state/multipathd + /bin/mkdir -p $CTDB_VARDIR/state/multipathd exit 0 ;; diff --git a/config/events.d/50.samba b/config/events.d/50.samba index 23dd060..047f9e0 100755 --- a/config/events.d/50.samba +++ b/config/events.d/50.samba @@ -34,7