Looking at using Plone for the independent school I work for and have been having issues when looking into ldap.
I've done a clean install of Ubuntu 16.04.1 in a Hyper-V VM.
Run the installer script from the Plone downloads page.
Proceeded to add pas.plugs.ldap 1.5.1 to the buildout.cfg eggs.
Run the buildout command.
Reboot the server, and the Plone page does not load.
Before I proceed, I'd like to say that any help would be greatly appreciated. I'm no programmer or developer, more general sys admin/networking.
So, in greater detail, following the instructions from here (https://pypi.python.org/pypi/pas.plugins.ldap):
- Installed dependencies
sudo apt install python-dev libldap2-dev libsasl2-dev libssl-dev
- Added
pas.plugins.ldap
to the eggs section of the buildout.cfg - Run
sudo -u plone_buildout ./bin/buildout
Here is the eggs section of my buildout.cfg:
eggs =
Plone
Pillow
Products.PloneHotfix20160830
Products.PloneHotfix20161129
pas.plugins.ldap
Here is the terminal output from the buildout:
Uninstalling precompiler.
Uninstalling zopepy.
Uninstalling instance.
Installing instance.
/opt/plone/zinstance/local/lib/python2.7/site-packages/pkg_resources/__init__.py:183: RuntimeWarning: You have iterated over the result of pkg_resources.parse_version. This is a legacy behavior which is inconsistent with the new version class introduced in setuptools 8.0. In most cases, conversion to a tuple is unnecessary. For comparison of versions, sort the Version instances directly. If you have another use case requiring the tuple, please file a bug with the setuptools project describing that need.
stacklevel=1,
Getting distribution for 'pas.plugins.ldap'.
Got pas.plugins.ldap 1.5.1.
Getting distribution for 'yafowil.yaml'.
warning: no previously-included files matching '*.pyc' found under directory 'src'
warning: no previously-included files matching '*.pyo' found under directory 'src'
Got yafowil.yaml 1.2.
Getting distribution for 'yafowil.widget.dict'.
warning: no previously-included files matching '*.pyc' found under directory 'src'
warning: no previously-included files matching '*.pyo' found under directory 'src'
Got yafowil.widget.dict 1.6.
Getting distribution for 'yafowil.widget.array'.
warning: no previously-included files matching '*.pyc' found under directory 'src'
warning: no previously-included files matching '*.pyo' found under directory 'src'
Got yafowil.widget.array 1.4.
Getting distribution for 'yafowil.plone>=1.3'.
warning: no previously-included files matching '*.pyc' found under directory 'src'
Got yafowil.plone 2.3.1.
Getting distribution for 'yafowil>=2.2b2'.
warning: no previously-included files matching '*.pyc' found under directory 'src'
warning: no previously-included files matching '*.pyo' found under directory 'src'
Got yafowil 2.2.
Getting distribution for 'python-ldap'.
defines: HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
extra_compile_args:
extra_objects:
include_dirs: /usr/include /usr/include/sasl /usr/local/include /usr/local/include/sasl
library_dirs: /usr/lib /usr/lib64 /usr/local/lib /usr/local/lib64
libs: ldap_r
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
warning: no files found matching 'Makefile'
warning: no files found matching 'Modules/LICENSE'
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
Got python-ldap 2.4.32.
Getting distribution for 'odict'.
Got odict 1.5.2.
Getting distribution for 'node.ext.ldap>=1.0b2'.
warning: no previously-included files matching '*.pyc' found under directory 'src'
warning: no previously-included files matching '*.pyo' found under directory 'src'
Got node.ext.ldap 1.0b3.
Getting distribution for 'node'.
warning: no previously-included files found matching 'bootstrap.sh'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
Got node 0.9.18.
Getting distribution for 'bda.cache'.
Got bda.cache 1.1.3.
Getting distribution for 'PyYAML'.
build/temp.linux-x86_64-2.7/check_libyaml.c:2:18: fatal error: yaml.h: No such file or directory
compilation terminated.
libyaml is not found or a compiler error: forcing --without-libyaml
(if libyaml is installed correctly, you may need to
specify the option --include-dirs or uncomment and
modify the parameter include_dirs in setup.cfg)
zip_safe flag not set; analyzing archive contents...
Got PyYAML 3.12.
Getting distribution for 'plumber>=1.3'.
warning: no previously-included files matching '*.pyc' found under directory 'src'
warning: no previously-included files matching '*.pyo' found under directory 'src'
Got plumber 1.3.1.
Getting distribution for 'node.ext.ugm'.
warning: no previously-included files matching '*.pyc' found under directory 'src'
warning: no previously-included files matching '*.pyo' found under directory 'src'
Got node.ext.ugm 0.9.8.
Getting distribution for 'argparse==1.4.0'.
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.orig' found anywhere in distribution
warning: no previously-included files matching '*.rej' found anywhere in distribution
no previously-included directories found matching 'doc/_build'
no previously-included directories found matching 'env24'
no previously-included directories found matching 'env25'
no previously-included directories found matching 'env26'
no previously-included directories found matching 'env27'
zip_safe flag not set; analyzing archive contents...
Got argparse 1.4.0.
Getting distribution for 'smbpasswd'.
smbpasswd.c: In function ‘lmhash’:
smbpasswd.c:100:18: warning: pointer targets in passing argument 2 of ‘E_P16’ differ in signedness [-Wpointer-sign]
E_P16(lmpwd, hashout);
^
smbpasswd.c:35:6: note: expected ‘unsigned char *’ but argument is of type ‘char *’
void E_P16(unsigned char *p14,unsigned char *p16);
^
smbpasswd.c: In function ‘nthash’:
smbpasswd.c:125:12: warning: pointer targets in passing argument 1 of ‘mdfour’ differ in signedness [-Wpointer-sign]
mdfour(hashout, pwd, pwd_len);
^
smbpasswd.c:34:6: note: expected ‘unsigned char *’ but argument is of type ‘char *’
void mdfour(unsigned char *out, unsigned char *in, int n);
^
smbpasswd.c:125:21: warning: pointer targets in passing argument 2 of ‘mdfour’ differ in signedness [-Wpointer-sign]
mdfour(hashout, pwd, pwd_len);
^
smbpasswd.c:34:6: note: expected ‘unsigned char *’ but argument is of type ‘char *’
void mdfour(unsigned char *out, unsigned char *in, int n);
^
zip_safe flag not set; analyzing archive contents...
Got smbpasswd 1.0.2.
Getting distribution for 'python-memcached'.
warning: no files found matching '*.rst'
warning: no files found matching 'MakeFile'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '.gitignore' found anywhere in distribution
warning: no previously-included files matching '.DS_Store' found anywhere in distribution
zip_safe flag not set; analyzing archive contents...
Got python-memcached 1.58.
Generated script '/opt/plone/zinstance/bin/instance'.
Generated interpreter '/opt/plone/zinstance/parts/instance/bin/interpreter'.
Generated script '/opt/plone/zinstance/bin/thresholder.py'.
Generated script '/opt/plone/zinstance/bin/pilfont.pyc'.
Generated script '/opt/plone/zinstance/bin/enhancer.py'.
Generated script '/opt/plone/zinstance/bin/gifmaker.pyc'.
Generated script '/opt/plone/zinstance/bin/pilprint.py'.
Generated script '/opt/plone/zinstance/bin/player.py'.
Generated script '/opt/plone/zinstance/bin/gifmaker.py'.
Generated script '/opt/plone/zinstance/bin/pildriver.pyc'.
Generated script '/opt/plone/zinstance/bin/pilfont.py'.
Generated script '/opt/plone/zinstance/bin/createfontdatachunk.pyc'.
Generated script '/opt/plone/zinstance/bin/painter.py'.
Generated script '/opt/plone/zinstance/bin/createfontdatachunk.py'.
Generated script '/opt/plone/zinstance/bin/pilfile.py'.
Generated script '/opt/plone/zinstance/bin/viewer.py'.
Generated script '/opt/plone/zinstance/bin/enhancer.pyc'.
Generated script '/opt/plone/zinstance/bin/pilconvert.py'.
Generated script '/opt/plone/zinstance/bin/painter.pyc'.
Generated script '/opt/plone/zinstance/bin/pildriver.py'.
Generated script '/opt/plone/zinstance/bin/pilfile.pyc'.
Generated script '/opt/plone/zinstance/bin/thresholder.pyc'.
Generated script '/opt/plone/zinstance/bin/explode.pyc'.
Generated script '/opt/plone/zinstance/bin/player.pyc'.
Generated script '/opt/plone/zinstance/bin/pilconvert.pyc'.
Generated script '/opt/plone/zinstance/bin/explode.py'.
Generated script '/opt/plone/zinstance/bin/pilprint.pyc'.
Generated script '/opt/plone/zinstance/bin/viewer.pyc'.
Updating repozo.
Updating backup.
Installing zopepy.
Generated interpreter '/opt/plone/zinstance/bin/zopepy'.
Updating unifiedinstaller.
Installing precompiler.
Compiling Python files.
Compiling locale files.
Error while compiling /opt/plone/buildout-cache/eggs/python_gettext-3.0-py2.7.egg/pythongettext/tests/test5.po
Error while compiling /opt/plone/buildout-cache/eggs/python_gettext-3.0-py2.7.egg/pythongettext/tests/test_escape.po
Updating setpermissions.
setpermissions: Running # Dummy references to force this to execute after referenced parts
echo /opt/plone/zinstance/var/backups yes > /dev/null
chmod 600 .installed.cfg
# Make sure anything we've created in var is r/w by our group
find /opt/plone/zinstance/var -type d -exec chmod 770 {} \; 2> /dev/null
find /opt/plone/zinstance/var -type f -exec chmod 660 {} \; 2> /dev/null
find /opt/plone/zinstance/var -type d -exec chmod 770 {} \; 2> /dev/null
find /opt/plone/zinstance/var -type f -exec chmod 660 {} \; 2> /dev/null
chmod 754 /opt/plone/zinstance/bin/*
chmod: changing permissions of '/opt/plone/zinstance/bin/buildout': Operation not permitted
Versions had to be automatically picked.
The following part definition lists the versions picked:
[versions]
node.ext.ldap = 1.0b3
pas.plugins.ldap = 1.5.1
plone.recipe.command = 1.1
plone.recipe.precompiler = 0.6
plumber = 1.3.1
yafowil = 2.2
yafowil.plone = 2.3.1
# Required by:
# yafowil.yaml==1.2
PyYAML = 3.12
# Required by:
# node.ext.ldap==1.0b3
# pas.plugins.ldap==1.5.1
bda.cache = 1.1.3
# Required by:
# pas.plugins.ldap==1.5.1
node = 0.9.18
# Required by:
# node.ext.ldap==1.0b3
node.ext.ugm = 0.9.8
# Required by:
# pas.plugins.ldap==1.5.1
odict = 1.5.2
# Required by:
# pas.plugins.ldap==1.5.1
python-ldap = 2.4.32
# Required by:
# bda.cache==1.1.3
python-memcached = 1.58
# Required by:
# node.ext.ldap==1.0b3
smbpasswd = 1.0.2
# Required by:
# pas.plugins.ldap==1.5.1
yafowil.widget.array = 1.4
# Required by:
# pas.plugins.ldap==1.5.1
yafowil.widget.dict = 1.6
# Required by:
# pas.plugins.ldap==1.5.1
yafowil.yaml = 1.2
Edit: here's the error I get when restarting plone after the buildout.
instance: Traceback (most recent call last):
File "/opt/plone/zinstance/bin/instance", line 273, in <module>
import plone.recipe.zope2instance.ctl
File "/opt/plone/buildout-cache/eggs/plone.recipe.zope2instance-4.2.21-py2.7.egg/plone/__init__.py", line 1, in <module>
__import__('pkg_resources').declare_namespace(__name__)
File "/opt/plone/zinstance/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3036, in <module>
@_call_aside
File "/opt/plone/zinstance/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3020, in _call_aside
f(*args, **kwargs)
File "/opt/plone/zinstance/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3064, in _initialize_master_working_set
for dist in working_set
File "/opt/plone/zinstance/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3064, in <genexpr>
for dist in working_set
File "/opt/plone/zinstance/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2592, in activate
for pkg in self._get_metadata('namespace_packages.txt'):
File "/opt/plone/zinstance/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2582, in _get_metadata
for line in self.get_metadata_lines(name):
File "/opt/plone/zinstance/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1472, in get_metadata_lines
return yield_lines(self.get_metadata(name))
File "/opt/plone/zinstance/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1468, in get_metadata
value = self._get(self._fn(self.egg_info, name))
File "/opt/plone/zinstance/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1577, in _get
with open(path, 'rb') as stream:
IOError: [Errno 13] Permission denied: '/opt/plone/buildout-cache/eggs/node-0.9.18-py2.7.egg/EGG-INFO/namespace_packages.txt'