Open Source Development

Power Open Source Development

Explore the open source tools and capabilities for building and deploying modern applications on IBM Power platforms including AIX, IBM i, and Linux.


#Power


#Power


#Servers
#Opensource
 View Only
  • 1.  Custom sudo development for AIX 7.1

    Posted 09/17/20 01:39 PM
    ​Hi All,

    seeking some help on gathering below pre-requisites for custom sudo development for my business requirement, please let me know where can I download below list of binaries for AIX7.1TL5SP2. also let me know if there are any other alternative binaries if not exactly below.

    For example : in absence of glibc I'm ok to use libc.

    Package
    Glibc
    glibc-devel
    glibc-common
    rpm-libs
    rpm-build
    rpm-build-libs
    openssl-libs
    openssl-devel
    Libcurl
    libcurl-devel
    sssd-common
    pam-devel
    zlib-devel
    Flex
    Bison
    Audit
    audit-libs
    audit-libs-devel
    Openldap
    openldap-clients
    openldap-devel
    Autoconf
    Automake
    Make

    Thanks,
    Sai Manduva

    ------------------------------
    seshatalpasai manduva
    ------------------------------

    #AIXOpenSource


  • 2.  RE: Custom sudo development for AIX 7.1

    Posted 09/17/20 01:47 PM
    https://www.ibm.com/support/pages/aix-toolbox-linux-applications-downloads-alpha

    AIX Toolbox contains most of the above listed packages needed for sudo. AIX Toolbox also has prebuilt sudo binary rpm and sudo src rpm. 

    For installing rpm packages, yum is the recommended way to go. Below article shows how to configure and use yum in AIX. 
    https://developer.ibm.com/technologies/systems/articles/configure-yum-on-aix/

    ------------------------------
    Ayappan P
    ------------------------------



  • 3.  RE: Custom sudo development for AIX 7.1

    Posted 09/17/20 05:32 PM
    Thanks Ayappan for prompt response. how ever we experienced below.

    While installing yum tar , there are following unsatisfied dependencies, please guide here if need to be worked on?


    Unsatisfied dependencies for python-2.7.10-1.ppc:

            libtcl8.4.so is needed by (installed) python-2.7.10-1.ppc

            libtk8.4.so is needed by (installed) python-2.7.10-1.ppc


    Having said that, I can see yum 3.4.3 installed

    # yum --version

    3.4.3

    Installed: yum-3.4.3-7.noarch at 2020-09-17 20:33

    Built    : None at 2019-03-04 11:12

    Committed: Sangamesh Mallayya <sangamesh.swamy@in.ibm.com> at 2019-03-05

    Trying to use yum to install a libcurl package : Failure

    # yum install libcurl

    anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/repodata/repomd.xml:">https://anonymous:anonymous@public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/repodata/repomd.xml: [Errno 14] curl#6 - "Couldn't resolve host 'public.dhe.ibm.com'"

    Trying other mirror.

    Error: Cannot retrieve repository metadata (repomd.xml) for repository: AIX_Toolbox. Please verify its path and try again
     
    To setup a local YUM repository, one of the systems must have access to the Internet and this system serves as the repository to other AIX systems.

    we do not support internet based repositories , hence this above yum solution won't work for us.
     please provide alternative here.
     
    We still have following lib/packages which we couldn't find in AIX tool box as suggested by forum, https://www.ibm.com/support/pages/node/883796
     https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/

    can someone give us the download links or any other alternative ?

    Package                   Available on AIX Toolbox ?
    Glibc                         No
    glibc-devel                No
    glibc-common           No
    rpm-libs                     No
    rpm-build                   No
    rpm-build-libs            No
    openssl-libs              No
    openssl-devel           No
    Libcurl                      No
    libcurl-devel              No
    sssd-common           No
    pam-devel                No
    Flex                           No
    audit-libs                    No
    audit-libs-devel           No
    Openldap                    Yes  (is below correct version for AIX 7.1 ?    this is the latest on toolbox
     openldap-2.4.50-1.aix6.1.ppc.rpm )
     

    openldap-clients       No

    openldap-devel        Yes
    is below correct version for AIX 7.1 ?
    this is the latest on toolbox
     openldap-devel-2.4.50-1.aix6.1.ppc.rpm
     08-Sep-2020 05:03 


    ------------------------------
    seshatalpasai manduva
    ------------------------------



  • 4.  RE: Custom sudo development for AIX 7.1

    Posted 09/18/20 04:09 AM
    Regarding the python dependency error, you should have tcl/tk fileset ( tcl.base, tk.base) to be installed in the system.

    There are other alternatives mentioned in the article if AIX systems don't have outbound access. If the other alternatives also don't work for you, then one has to manually download the rpms and install it ( You have to go through the pain of resolving package dependencies).

    glibc --> no need 
    rpm-libs/others  --> part of rpm.rte
    openssl --> openssl.base (part of AIX base/ also in AIX web download pack programs)
    libcurl, libcurl-devel  --> available in Toolbox (part of curl & curl-devel )
    sssd-common - Not available.
    pam-devel --> not required
    flex --> available in Toolbox
    audit/Other --> part of AIX base ? (probably bos.rte.security)
    Openldap --> available in Toolbox (yes , that is the one)

    ------------------------------
    Ayappan P
    ------------------------------



  • 5.  RE: Custom sudo development for AIX 7.1

    Posted 10/01/20 12:55 PM
    Hi Ayappan,

    We are experiencing below Issues while building managed sudo, please have a look and see whether if you can help us?

     

    1) while building pam_radius_auth.so module we get error and it requires Ifaddrs.h file , we are suspecting it's part of pam-devel lib , which is not available on AIX tool box

    2) we tried building sudo package with openldap it fails with following

    implicit declaration of function 'ldap_ssl_client_init'

    warning: implicit declaration of function 'ldap_init'

    warning: implicit declaration of function 'ldap_unbind_s'

    warning: implicit declaration of function 'ldap_start_tls_s_np'

     

       and we are suspecting this is part of openldap-client lib which is not available on AIX tool box

     

    3) when we try to build managed sudo with IBM ldap lib we get following error

    Make fails with error as it finds enum ALL = 285 declared in gram.h:76:6: and same enum declared in /opt/IBM/ldap/V6.4/include/ldap.h:957:7 with All = 0

    but the gram.h helps in parsing sudoers file whereas /opt/IBM/ldap/V6.4/include/ldap.h is purely for configuring ldap otpions, so this is conflicting

    (which should not be the case)

     

       we are using following configure options

     

    ./configure --prefix=/opt/freeware --bindir=/opt/freeware/bin --sbindir=/opt/freeware/sbin --mandir=/opt/freeware/man --sysconfdir=/etc --includedir=/opt/freeware/include --with-insults=disabled --with-logging=syslog --with-editor=/bin/vi --with-  

       env-editor --with-ignore-dot --with-tty-tickets --with-pam --without-lecture  --without-sendmail --disable-zlib --disable-root-sudo  --with-pam-login --with-logfac=authpriv --with-logging=syslog --with-ldap=/opt/IBM/ldap/V6.4--with-ldap-conf-

       file=/etc/sudo_ldap.conf --with-netsvc=/etc/netsvc.conf


    Thanks,
    Sai Manduva

    ------------------------------
    seshatalpasai manduva
    ------------------------------



  • 6.  RE: Custom sudo development for AIX 7.1

    Posted 10/05/20 01:48 AM
    Hi Manduva,

    Yes. To build pam_radius_auth.so looks we need to have the pam-devel installed.
    We do build our sudo with AIX pam support, not sure if this will provide the functionality as pam_radius.


    Please go through our SPEC files which we used it for the building sudo with both openldap and IBM ldap support.
    Have a look at CFLAGS, LDFALGS and configuration options we used.

    https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/SPECS/sudo-1.8.31p1-1.spec
    https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/SPECS/sudo_ids-1.8.31p1-2.spec

    ------------------------------
    SANGAMESH
    ------------------------------