Jul 28, 2010 10:25 AM
Ubuntu 10.04, Zenoss 3.0, LDAP
-
Like (0)
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
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
@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!
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
Hi I am a totaly new to Zenoss (Zope) python stuff.
I tried to do the install like this:
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
First, you seem to be in root user, you should never install stuff as root, stay in the zenoss user and if admin privileges are required, call it with sudo from the zenoss user.
Many components of zenoss have permission issues if installed under root.
As for your errors, keep in mind that installing LDAP compatibility for me is about step 25 in the whole ubuntu/zenoss install process, maybe something earlier in the process is causing you grief.
Manuel
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?
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 ?
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
@ 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).
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.
I don't know if this will affect the problems folks might be having, but I use Ubuntu server 10.04 64 bit, also, before I reach the step of installing LDAP support, I do have a fully functional LDAP server on that very same machine.
Manuel
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
An error was encountered while publishing this resource.
Sorry, a site error occurred.
Traceback (innermost last):
{'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>}
UnicodeDecodeError: 'utf8' codec can't decode byte 0x80 in position 8: unexpected code byte
Troubleshooting Suggestions
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.
Sorry, can't help you there, I've only linked this to Apple OS X Open DIrectory, haven't played with OD linking yet (on my to do list though).
Manuel
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
Follow Us On Twitter »
|
Latest from the Zenoss Blog » | Community | Products | Services Resources | Customers Partners | About Us | ||
Copyright © 2005-2011 Zenoss, Inc.
|
||||||||