Archived community.zenoss.org | full text search
Skip navigation
1 2 Previous Next 34494 Views 20 Replies Latest reply: Dec 29, 2011 12:31 PM by shoerner RSS
themactech Rank: Brown Belt 537 posts since
Apr 13, 2009
Currently Being Moderated

Jul 28, 2010 10:25 AM

Ubuntu 10.04, Zenoss 3.0, LDAP

Ok here is how I got the LDAP working in Ubuntu 10.04 and Zenoss 3.0.

 

Now maybe your Ubuntu base install varies from mine, so there is no money back guarantee.

 

From the zenoss user, sudo apt-get install python-ldap

 

Download and decompress the 2 plugins to the /home/zenoss/ folder, as of today the latest versions are:

 

Products.LDAPMultiPlugins-1.11

Products.LDAPUserFolder-2.17

 

Now, for each of these folders do the following:

 

     1- cd into the folder

     2- type python setup.py install

     3- when process is completed cd /build/lib/Products/

     4- mv LDAPMultiPlugin (or LDAPUserFolder) /usr/local/zenoss/zenoss/Products/

 

When this is done with both folder, restart your zenoss (I restarted the computer but maybe you can only restart zenoss, not sure).

 

Then proceed with the configurations part of previous tutorials.

 

This worked for me, if it doesn't for you or you need to do something different to get it working, please post it for others.

 

Manuel

  • rkda Newbie 4 posts since
    Jul 27, 2010
    Currently Being Moderated
    1. Jul 29, 2010 3:30 AM (in response to themactech)
    Re: Ubuntu 10.04, Zenoss 3.0, LDAP

    Thanks man. Will test it later.

     

     

    Update:

     

    Done

     

    Can't restart Zope though When I run zopectl restart I get:

     

     

    Traceback (most recent call last):
      File "/usr/local/bin/zopectl", line 9, in <module>
        load_entry_point('Zope2==2.13.0a2', 'console_scripts', 'zopectl')()
      File "/usr/local/lib/python2.6/dist-packages/Zope2-2.13.0a2-py2.6.egg/Zope2/Startup/zopectl.py", line 407, in run
        exitstatus = main()
      File "/usr/local/lib/python2.6/dist-packages/Zope2-2.13.0a2-py2.6.egg/Zope2/Startup/zopectl.py", line 363, in main
        options.realize(args)
      File "/usr/local/lib/python2.6/dist-packages/Zope2-2.13.0a2-py2.6.egg/Zope2/Startup/zopectl.py", line 170, in realize
        self.directory = config.instancehome
    AttributeError: 'NoneType' object has no attribute 'instancehome'

     

    Message was edited by: rkda

  • Miquel Torres Newbie 3 posts since
    Jul 29, 2010
    Currently Being Moderated
    2. Jul 29, 2010 12:53 PM (in response to rkda)
    Re: Ubuntu 10.04, Zenoss 3.0, LDAP

    @rkda: It could well be because you are using Zope 2.13 alpha2

    when doing a plain python setup.py install it pulls the Zope alpha. You need to pin it.

     

    Tomorrow I'll be trying to configure LDAP myself. I'll report back how it goes. Thanks for posting this themactech!

  • Matt Ray Rank: Zen Master 2,484 posts since
    Apr 5, 2008
    Currently Being Moderated
    3. Jul 29, 2010 6:28 PM (in response to themactech)
    Re: Ubuntu 10.04, Zenoss 3.0, LDAP

    If you could update HowTo use LDAP/ActiveDirectory for Authentication and Authorization with these 3.0 notes, I'm sure a lot of folks would appreciate this.

     

    Thanks!

    Matt Ray

    Zenoss Community Manager

  • keamas Newbie 5 posts since
    Jul 29, 2010
    Currently Being Moderated
    4. Jul 29, 2010 8:12 PM (in response to Matt Ray)
    Re: Ubuntu 10.04, Zenoss 3.0, LDAP

    Hi I am a totaly new to Zenoss (Zope) python stuff.

    I tried to do the install like this:

     

    root@Scruffy:/home/zenoss/Products.LDAPUserFolder-2.18# python setup.py install
    Traceback (most recent call last):
      File "setup.py", line 2, in <module>
        from setuptools import setup
    ImportError: No module named setuptools

     

    This helped

     

     

     

    root@Scruffy:/home/zenoss/Products.LDAPUserFolder-2.18# apt-get install python-setuptools python3-setuptools

     

     

    And I don't have this folder. Which folder should I copy or is something wrong ?

     

    And I had the following error is this important ?

     

    Running Products.PluginRegistry-1.3b1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-US17Uq/Products.PluginRegistry-1.3b1/egg-dist-tmp-QyT5Y6

    Traceback (most recent call last):

      File "setup.py", line 59, in <module>

        """ % (NAME, NAME),

      File "/usr/lib/python2.6/distutils/core.py", line 152, in setup

        dist.run_commands()

      File "/usr/lib/python2.6/distutils/dist.py", line 975, in run_commands

        self.run_command(cmd)

      File "/usr/lib/python2.6/distutils/dist.py", line 995, in run_command

        cmd_obj.run()

      File "/usr/lib/python2.6/dist-packages/setuptools/command/install.py", line 73, in run

        self.do_egg_install()

      File "/usr/lib/python2.6/dist-packages/setuptools/command/install.py", line 101, in do_egg_install

        cmd.run()

      File "/usr/lib/python2.6/dist-packages/setuptools/command/easy_install.py", line 254, in run

        self.easy_install(spec, not self.no_deps)

      File "/usr/lib/python2.6/dist-packages/setuptools/command/easy_install.py", line 470, in easy_install

        return self.install_item(None, spec, tmpdir, deps, True)

      File "/usr/lib/python2.6/dist-packages/setuptools/command/easy_install.py", line 521, in install_item

        self.process_distribution(spec, dist, deps)

      File "/usr/lib/python2.6/dist-packages/setuptools/command/easy_install.py", line 562, in process_distribution

        [requirement], self.local_index, self.easy_install

      File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 538, in resolve

        dist = best[req.key] = env.best_match(req, self, installer)

      File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 780, in best_match

        return self.obtain(req, installer) # try and download/install

      File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 792, in obtain

        return installer(requirement)

      File "/usr/lib/python2.6/dist-packages/setuptools/command/easy_install.py", line 489, in easy_install

        return self.install_item(spec, dist.location, tmpdir, deps)

      File "/usr/lib/python2.6/dist-packages/setuptools/command/easy_install.py", line 519, in install_item

        dists = self.install_eggs(spec, download, tmpdir)

      File "/usr/lib/python2.6/dist-packages/setuptools/command/easy_install.py", line 698, in install_eggs

        return self.build_and_install(setup_script, setup_base)

      File "/usr/lib/python2.6/dist-packages/setuptools/command/easy_install.py", line 975, in build_and_install

        self.run_setup(setup_script, setup_base, args)

      File "/usr/lib/python2.6/dist-packages/setuptools/command/easy_install.py", line 964, in run_setup

        run_setup(setup_script, args)

      File "/usr/lib/python2.6/dist-packages/setuptools/sandbox.py", line 29, in run_setup

        lambda: execfile(

      File "/usr/lib/python2.6/dist-packages/setuptools/sandbox.py", line 70, in run

        return func()

      File "/usr/lib/python2.6/dist-packages/setuptools/sandbox.py", line 31, in <lambda>

        {'__file__':setup_script, '__name__':'__main__'}

      File "setup.py", line 54, in <module>

        ]

      File "/usr/lib/python2.6/distutils/core.py", line 152, in setup

        dist.run_commands()

      File "/usr/lib/python2.6/distutils/dist.py", line 975, in run_commands

        self.run_command(cmd)

      File "/usr/lib/python2.6/distutils/dist.py", line 995, in run_command

        cmd_obj.run()

      File "/usr/lib/python2.6/dist-packages/setuptools/command/bdist_egg.py", line 167, in run

        self.run_command("egg_info")

      File "/usr/lib/python2.6/distutils/cmd.py", line 333, in run_command

        self.distribution.run_command(command)

      File "/usr/lib/python2.6/distutils/dist.py", line 995, in run_command

        cmd_obj.run()

      File "/usr/lib/python2.6/dist-packages/setuptools/command/egg_info.py", line 171, in run

        writer = ep.load(installer=installer)

      File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 1948, in load

        entry = __import__(self.module_name, globals(),globals(), ['__name__'])

    ImportError: No module named eggtestinfo


  • rkda Newbie 4 posts since
    Jul 27, 2010
    Currently Being Moderated
    6. Jul 29, 2010 11:03 PM (in response to themactech)
    Re: Ubuntu 10.04, Zenoss 3.0, LDAP

    Oh, installed the plugins as root too. Could that have been causing the problems with Zope? How do I clean it and start over? Could I just delete the plugins from the /Products directory?

  • keamas Newbie 5 posts since
    Jul 29, 2010
    Currently Being Moderated
    7. Jul 30, 2010 6:08 AM (in response to rkda)
    Re: Ubuntu 10.04, Zenoss 3.0, LDAP

    Hmm ok tried it again but did now work so far.

    For Step 3 and 4 I used this folder:

     

    /home/zenoss/Products.LDAPUserFolder-2.18/build/lib.linux-i686-2.6/Products

     

    Is this right ?

  • Miquel Torres Newbie 3 posts since
    Jul 29, 2010
    Currently Being Moderated
    8. Jul 30, 2010 7:16 AM (in response to rkda)
    Re: Ubuntu 10.04, Zenoss 3.0, LDAP

    Ok, I have succesfully installed LDAP on Debian Lenny (which has Python 2.5).

     

    The problem you have probably runs deeper. You may not have even the right python-ldap installed, because Zenoss uses its own python libraries.

     

    What I did is to download the debian sid package (which is already based on Python 2.6), uncompress it, and copy the files to the /usr/local/zenoss/python/lib/python2.6/site-packages/

     

    see the file list at http://packages.debian.org/squeeze/amd64/python-ldap/filelist

     

    The you can download the plugins, and install them with /usr/local/zenoss/python/bin/python setup.py install

    and then copy to the zenoss product dir.

     

    The plugin is now listed at /zport/manage

     

    The problem I now have is that I can not connect it to my LDAP server, probably because I have TLS. My LDAP server says that a connection was established, but zenoss always says "an error has ocurred"

    Type:
    Value: {'desc': "Can't contact LDAP server"}

     

    I tried different things without success. I will start new to ensure that I don't have problematic packages that may have been pulled from PyPi and report back

  • Miquel Torres Newbie 3 posts since
    Jul 29, 2010
    Currently Being Moderated
    9. Jul 30, 2010 7:20 AM (in response to Matt Ray)
    Re: Ubuntu 10.04, Zenoss 3.0, LDAP

    @ Mat Ray: As you can see from my previous post, it is not an easy procedure. The document you mention could get a bit confusing/long, so a new one for systems with no Python 2.6 could be created, otherwise a new section.

     

    Anyway if I can sort out my problems with TLS (or whatever it is) I will post the whole instructions (in a new doc or commenting on the old one, however you prefer).

  • rkda Newbie 4 posts since
    Jul 27, 2010
    Currently Being Moderated
    10. Aug 1, 2010 11:29 PM (in response to Miquel Torres)
    Re: Ubuntu 10.04, Zenoss 3.0, LDAP

    Miquel Torres wrote:

     

    @rkda: It could well be because you are using Zope 2.13 alpha2

    when doing a plain python setup.py install it pulls the Zope alpha. You need to pin it.

     

    Tomorrow I'll be trying to configure LDAP myself. I'll report back how it goes. Thanks for posting this themactech!

     

     

    Okay. How do I pin it?

     

    Btw, how do I revert to the old Zope version?

     

    Already removed the Zenoss stack package and reinstalled it but the it seems not to affect my Zope install. It's still using the alpha. Thanks.

  • the_jack Rank: White Belt 28 posts since
    Jun 24, 2010
    Currently Being Moderated
    12. Aug 18, 2010 11:40 AM (in response to themactech)
    Re: Ubuntu 10.04, Zenoss 3.0, LDAP

    OK, once I did this "download the debian sid package" and copied to site-packages as Miquel Torres suggested, everything appeared to go smooth.  Zope has the plugins and is talking to AD (enumerated my groups, etc).. but when I try to login with an AD user I get below...

     

    Actually, it only happens with a correct AD login.  If I try a bad password for AD, I get correct bad password, which further confirms I am talking to AD.  But with a valid password, I get below.

     

    Any suggestions?

     

    Jack

    Site Error

    An error was encountered while publishing this resource.

     

    Sorry, a site error occurred.

    Traceback (innermost last):

    • Module ZPublisher.Publish, line 231, in publish_module_standard
    • Module ZPublisher.Publish, line 165, in publish
    • Module Zope2.App.startup, line 211, in __call__
    • Module Products.ZenUI3.browser, line 105, in __call__
    • Module Products.Five.browser.pagetemplatefile, line 60, in __call__
    • Module zope.pagetemplate.pagetemplate, line 115, in pt_render
    • Module zope.tal.talinterpreter, line 271, in __call__
    • Module zope.tal.talinterpreter, line 343, in interpret
    • Module zope.tal.talinterpreter, line 858, in do_defineMacro
    • Module zope.tal.talinterpreter, line 343, in interpret
    • Module zope.tal.talinterpreter, line 852, in do_condition
    • Module zope.tal.talinterpreter, line 343, in interpret
    • Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    • Module zope.tal.talinterpreter, line 518, in do_optTag
    • Module zope.tal.talinterpreter, line 513, in no_tag
    • Module zope.tal.talinterpreter, line 343, in interpret
    • Module zope.tal.talinterpreter, line 742, in do_insertStructure_tal
    • Module Products.PageTemplates.Expressions, line 195, in evaluateStructure
    • Module zope.tales.tales, line 696, in evaluate
      URL: /usr/local/zenoss/zenoss/Products/ZenUI3/browser/error_message.pt
      Line 71, Column 0
      Expression: <PathExpr standard:u'view/error_message'>
      Names:
      {'args': (),
      'container': BadRequest('The id "\x8013HufHK\x90i\xdf\x048\xce\xf3X" contains characters illegal in URLs.',),
      'context': BadRequest('The id "\x8013HufHK\x90i\xdf\x048\xce\xf3X" contains characters illegal in URLs.',),
      'default': <object object at 0x7fe11340aab0>,
      'here': BadRequest('The id "\x8013HufHK\x90i\xdf\x048\xce\xf3X" contains characters illegal in URLs.',),
      'loop': {},
      'nothing': None,
      'options': {},
      'repeat': <Products.PageTemplates.Expressions.SafeMapping object at 0x68034d0>,
      'request': <HTTPRequest, URL=http://zenoss.wvnoc.com:8080/zport/dmd/@@Dashboard>,
      'root': None,
      'template': <Products.Five.browser.pagetemplatefile.ViewPageTemplateFile object at 0x68ae790>,
      'traverse_subpath': [],
      'user': <PropertiedUser 'cfromm'>,
      'view': <Products.Five.metaclass.ErrorMessage object at 0x7967cd0>,
      'views': <Products.Five.browser.pagetemplatefile.ViewMapper object at 0x78efd50>}
    • Module zope.tales.expressions, line 217, in __call__
    • Module Products.PageTemplates.Expressions, line 127, in _eval
    • Module zope.tales.expressions, line 124, in _eval
    • Module Products.PageTemplates.Expressions, line 79, in boboAwareZopeTraverse
    • Module zope.traversing.adapters, line 138, in traversePathElement
      __traceback_info__: (<Products.Five.metaclass.ErrorMessage object at 0x7967cd0>, 'error_message')
    • Module zope.traversing.adapters, line 44, in traverse
      __traceback_info__: (<Products.Five.metaclass.ErrorMessage object at 0x7967cd0>, 'error_message', [])
    • Module Products.ZenUI3.browser, line 100, in error_message
    • Module Products.ZenModel.DataRoot, line 414, in zenoss_error_message
    • Module Shared.DC.Scripts.Bindings, line 324, in __call__
    • Module Shared.DC.Scripts.Bindings, line 361, in _bindAndExec
    • Module Products.CMFCore.FSPageTemplate, line 240, in _exec
    • Module Products.CMFCore.FSPageTemplate, line 180, in pt_render
    • Module Products.PageTemplates.PageTemplate, line 80, in pt_render
    • Module zope.pagetemplate.pagetemplate, line 115, in pt_render
    • Module zope.tal.talinterpreter, line 271, in __call__
    • Module zope.tal.talinterpreter, line 343, in interpret
    • Module zope.tal.talinterpreter, line 888, in do_useMacro
    • Module zope.tal.talinterpreter, line 343, in interpret
    • Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    • Module zope.tal.talinterpreter, line 518, in do_optTag
    • Module zope.tal.talinterpreter, line 513, in no_tag
    • Module zope.tal.talinterpreter, line 343, in interpret
    • Module zope.tal.talinterpreter, line 888, in do_useMacro
    • Module zope.tal.talinterpreter, line 343, in interpret
    • Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    • Module zope.tal.talinterpreter, line 518, in do_optTag
    • Module zope.tal.talinterpreter, line 513, in no_tag
    • Module zope.tal.talinterpreter, line 343, in interpret
    • Module zope.tal.talinterpreter, line 954, in do_defineSlot
    • Module zope.tal.talinterpreter, line 343, in interpret
    • Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    • Module zope.tal.talinterpreter, line 518, in do_optTag
    • Module zope.tal.talinterpreter, line 513, in no_tag
    • Module zope.tal.talinterpreter, line 343, in interpret
    • Module zope.tal.talinterpreter, line 531, in do_optTag_tal
    • Module zope.tal.talinterpreter, line 513, in no_tag
    • Module zope.tal.talinterpreter, line 343, in interpret
    • Module zope.tal.talinterpreter, line 946, in do_defineSlot
    • Module zope.tal.talinterpreter, line 343, in interpret
    • Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    • Module zope.tal.talinterpreter, line 518, in do_optTag
    • Module zope.tal.talinterpreter, line 513, in no_tag
    • Module zope.tal.talinterpreter, line 343, in interpret
    • Module zope.tal.talinterpreter, line 946, in do_defineSlot
    • Module zope.tal.talinterpreter, line 343, in interpret
    • Module zope.tal.talinterpreter, line 533, in do_optTag_tal
    • Module zope.tal.talinterpreter, line 518, in do_optTag
    • Module zope.tal.talinterpreter, line 513, in no_tag
    • Module zope.tal.talinterpreter, line 343, in interpret
    • Module zope.tal.talinterpreter, line 852, in do_condition
    • Module zope.tal.talinterpreter, line 343, in interpret
    • Module zope.tal.talinterpreter, line 531, in do_optTag_tal
    • Module zope.tal.talinterpreter, line 513, in no_tag
    • Module zope.tal.talinterpreter, line 343, in interpret
    • Module zope.tal.talinterpreter, line 620, in do_insertText_tal
    • Module Products.PageTemplates.Expressions, line 203, in evaluateText
    • Module Products.PageTemplates.Expressions, line 241, in _handleText

    UnicodeDecodeError: 'utf8' codec can't decode byte 0x80 in position 8: unexpected code byte


    Troubleshooting Suggestions

    • The URL may be incorrect.
    • The parameters passed to this resource may be incorrect.
    • A resource that this resource relies on may be       encountering an error.

    For more detailed information about the error, please   refer to the error log.

    If the error persists please contact the site maintainer.   Thank you for your patience.

  • the_jack Rank: White Belt 28 posts since
    Jun 24, 2010
    Currently Being Moderated
    14. Aug 18, 2010 12:07 PM (in response to the_jack)
    Re: Ubuntu 10.04, Zenoss 3.0, LDAP

    Figured this out....

     

    When I first configured the AD MultiPlugin, the only options were objectGUID for User ID Attribitute and Canonical name for RDN Attribute.  I went back in and SAMACCOUNTNAME is there for both of them.  Changing to it for both fixed the problem.

     

    Jack

1 2 Previous Next