Originally posted by: M.R. Willemse
Ladies and Gentlemen,
I am trying to make a new AIX 7.1 image that will come out of the NIM server as Ansible-capable. I recently found the Yum Bundle on the IBM website, so I decided to use that since it includes Python. It's nice to see Yum being added to AIX, because we do lots of things with RPMs, mostly on Linux, and it will be nice to have AIX play along in the configuration management euphoria.
Ansible requires some way of getting root access, so I decided to yum install sudo. It dragged in openldap for dependencies, because sudo can get its information from LDAP these days. And here is the crux of the problem.
I use LDAP for user authentication against an openldap server, using idsldap.clt32bit62.rte. It delivers a link to a link to a link named /usr/lib/libldap.a. Sudo's sudoers.so doesn't like it:
$ sudo
sudo: error in /etc/sudo.conf, line 0 while loading plugin `sudoers_policy'
sudo: unable to load /opt/freeware/libexec/sudo/sudoers.so: Could not load module /opt/freeware/libexec/sudo/sudoers.so.
Dependent module /usr/lib/libldap.a(libldap-2.4.so.2) could not be loaded.
File /usr/lib/libldap.a is not an
archive or the file could not be read properly.
System error: Exec format error
Could not load module /opt/freeware/libexec/sudo/sudoers.so.
Dependent module /opt/freeware/libexec/sudo/sudoers.so could not be loaded.
sudo: fatal error, unable to load plugins
The libldap.a that sudoers.so wants, is actually in /opt/freeware/lib. I have tested this by temporarily renaming /usr/lib/libldap.a. Sudo works when I do, but I obviously can't leave it like that because then nobody can log in anymore. Oh, and if I set LIBPATH to /opt/freeware/lib, it gets overridden by Sudo, because you can't have Sudo just loading anyone's libraries. There is only one user that does work for: root.
The bigger picture here is that I assume many Linux Toolbox libraries will already be provided as a part of AIX, and the Linux Toolbox software won't like them for being insufficiently like Linux. Is it possible to compile or configure Linux Toolbox packages so that they will prefer /opt/freeware/lib over /usr/lib?