AIX Open Source

 View Only
Expand all | Collapse all

Installing new sudo 1.9.5p2 package on AIX OS

  • 1.  Installing new sudo 1.9.5p2 package on AIX OS

    Posted Thu February 04, 2021 08:06 PM
    Hi,
       We are attempting to use new sudo package on our aix os version 7.2 sudo-1.9.5p2-1.aix6.1.ppc.rpm
    
    Ran rpm to update the sudo.. got this..

    rpm -Uvh sudo-1.9.5p2-1.aix6.1.ppc.rpm
    error: Failed dependencies:
    gettext >= 0.19.8.1 is needed by sudo-1.9.5p2-1.ppc
    liblber.a(liblber-2.4.so.2) is needed by sudo-1.9.5p2-1.ppc
    libldap.a(libldap-2.4.so.2) is needed by sudo-1.9.5p2-1.ppc
    openldap >= 2.4.48-1 is needed by sudo-1.9.5p2-1.ppc
    zlib >= 1.2.11-1 is needed by sudo-1.9.5p2-1.ppc

    Went back to ibm aix tools for linux, downloaded all packages except liblber.a and libldap.a.   Not sure where to find or is there another way of doing this maybe use nodep?

    Thanks, Scott

    ------------------------------
    Scott Roberts
    ------------------------------


  • 2.  RE: Installing new sudo 1.9.5p2 package on AIX OS

    Posted Fri February 05, 2021 12:47 AM
    I had same kind of problem , really frustrated . Experts , please guide me too.

    My repo downloaded both  latest 1.9.5p2-1 Sudo files , but  " yum update sudo " says  "No Packages marked for Update " , but If  I try manual update with rpm -Uvh I am getting same error like Scott mentioned above . What is wrong here ? I tried to install both files separately with rpm -Uvh , see below.

    --> rpm -qa |grep sudo
    sudo-1.8.15-1noldap.ppc

    --> rpm -Uvh ./sudo-1.9.5p2-1.aix6.1.ppc.rpm
    error: Failed dependencies:
    liblber.a(liblber-2.4.so.2) is needed by sudo-1.9.5p2-1.ppc
    libldap.a(libldap-2.4.so.2) is needed by sudo-1.9.5p2-1.ppc
    openldap >= 2.4.48-1 is needed by sudo-1.9.5p2-1.ppc

    root@mpgilvmaix003 /ops
    --> rpm -Uvh ./sudo_ids-1.9.5p2-1.aix6.1.ppc.rpm
    error: Failed dependencies:
    sudo conflicts with sudo_ids-1.9.5p2-1.ppc

    If  yum client had  sudo-1.8.20-3.ppc , then it pulls 1.8.15-1noldap rather than sudo-1.9.5p2 .. why it tries to downgrade lower version from 8.20 to 8.15 when I run Yum update sudo ?  I do not understand this at all .

    Repo had latest sudo files:
    root@aix001 > /usr/IBMAHS/htdocs/aixtoolbox/AIX_Toolbox/sudo
    --> ls -ltr|tail -5
    -rw-r--r-- 1 web web 3791178 Jun 26 2020 sudo_ids-1.8.31p1-2.aix6.1.ppc.rpm
    -rw-r--r-- 1 web web 3791137 Oct 27 06:02 sudo_ids-1.8.31p1-3.aix6.1.ppc.rpm
    -rw-r--r-- 1 web web 3143131 Oct 27 06:02 sudo-1.8.31p1-2.aix6.1.ppc.rpm
    -rw-r--r-- 1 web web 5184542 Jan 28 11:02 sudo_ids-1.9.5p2-1.aix6.1.ppc.rpm
    -rw-r--r-- 1 web web 4407927 Jan 28 11:02 sudo-1.9.5p2-1.aix6.1.ppc.rpm

    --> rpm -qa |grep sudo
    sudo-1.8.20-3.ppc

    --> yum update sudo
    Setting up Update Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package sudo.ppc 0:1.8.20-3 will be updated
    ---> Package sudo.ppc 2008050201:1.8.15-1noldap will be an update
    --> Finished Dependency Resolution

    Dependencies Resolved

    =================================================================================================================================================================
    Package Arch Version Repository Size
    =================================================================================================================================================================
    Updating:
    sudo ppc 2008050201:1.8.15-1noldap AIX_Toolbox 516 k    ....It picked 1.8.15 rather sudo-1.9.5p2-1 ? 

    Thanks for you help . I opened IBM ticket too , but no help there either.

    Nag







    ------------------------------
    Nag N
    ------------------------------



  • 3.  RE: Installing new sudo 1.9.5p2 package on AIX OS

    Posted Fri February 05, 2021 03:32 AM
    I am not an expert with yum in combination with AIX. But what I have found useful to minimize problems with package management systems like yum (RedHat), zypper (Suse), and apt (Debian/Ubuntu) on Linux is to avoid the underlying tools like rpm, or dpkg.

    If there is no real need to use these basic tools always use the higher level ones. I know this is not always possible.

    And if you are running into problems like inconsistencies in dependencies, first try to clean all caches and locally stored data.

    After cleaning yum's cached data, I was able to install sudo 1.9.5p2-1 on AIX 7.2. What I have done is the following:

    1. yum clean all
    2. yum update
    3. yum install sudo
    ​Important difference to your situation: On my system sudo was missing and so I had to install it the first time. No update of an existing sudo package needed. So this can make a difference.

    Chris



    ------------------------------
    Christian Brüssow
    Teamlead and Principal Software Engineer
    Cenit AG
    Stuttgart
    ------------------------------



  • 4.  RE: Installing new sudo 1.9.5p2 package on AIX OS

    Posted Fri February 05, 2021 07:42 AM
    Thank you for the replies.   We cannot use yum due to servers are in Production and not allow to add on.

    ------------------------------
    Scott Roberts
    ------------------------------



  • 5.  RE: Installing new sudo 1.9.5p2 package on AIX OS

    Posted Fri February 05, 2021 08:37 AM
    I understand.

    So I think it is also not an option to reduild rpm's database? Maybe after making a backup of rpm's data in /var/lib/rpm/ ?

    The database is rebuild by
    rpm -vv --rebuilddb > /tmp/rebuildrpmdata.log 2>&1

    I am still aiming at caches and databases of the package management system, because my machine was a completely new installation of AIX 7.2 (oslevel -r shows 7200-05) in the IBM Cloud.

    ------------------------------
    Christian Brüssow
    Teamlead and Principal Software Engineer
    Cenit AG
    Stuttgart
    ------------------------------



  • 6.  RE: Installing new sudo 1.9.5p2 package on AIX OS

    Posted Fri February 05, 2021 08:13 AM
    I tried with those 3 commands , but no help.  the 3rd command  "yum install sudo"  says sudo already install  and  
    --> yum update sudo
    Setting up Update Process
    No Packages marked for Update

    Experts, can you please read my above post and respond , Though my repo had both latest Sudo files , why yum client not picking and ignoring the latest.

    ------------------------------
    Nag N
    ------------------------------



  • 7.  RE: Installing new sudo 1.9.5p2 package on AIX OS

    Posted Fri February 05, 2021 08:24 AM
    I am sorry, that it did not help.

    So it must be something other, which I do not know as I had no problems with the new version if sudo.

    You can try to uninstall and then install sudo again. But that will risk, you will end up with no sudo installed at all. So I would only try this on an unimportant system for testing.

    ------------------------------
    Christian Brüssow
    Teamlead and Principal Software Engineer
    Cenit AG
    Stuttgart
    ------------------------------



  • 8.  RE: Installing new sudo 1.9.5p2 package on AIX OS

    Posted Fri February 05, 2021 08:37 AM
    I removed sudo from my test system and tried fresh install m still it is picking 1.8.15-1noldap , rather  1.9.5p2 ... is something wrong with my yum repo ? or ami I missing some rpms?
    --> rpm -e sudo
    warning: /etc/sudoers saved as /etc/sudoers.rpmsave

    --> yum install sudo
    Setting up Install Process
    Resolving Dependencies
    There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them.
    The program yum-complete-transaction is found in the yum-utils package.
    --> Running transaction check
    ---> Package sudo.ppc 2008050201:1.8.15-1noldap will be installed
    --> Finished Dependency Resolution

    Dependencies Resolved

    ====================================================================================================================================================================
    Package Arch Version Repository Size
    ====================================================================================================================================================================
    Installing:
    sudo ppc 2008050201:1.8.15-1noldap AIX_Toolbox 516 k

    Transaction Summary
    ====================================================================================================================================================================
    Install 1 Package

    Total download size: 516 k
    Installed size: 1.5 M
    Is this ok [y/N]: n



    ------------------------------
    Nag N
    ------------------------------



  • 9.  RE: Installing new sudo 1.9.5p2 package on AIX OS

    Posted Fri February 05, 2021 08:58 AM

    My repos are:

    # yum repolist
    repo id              repo name                    status
    AIX_Toolbox          AIX generic repository       2,791
    AIX_Toolbox_72       AIX 7.2 specifc repository     293
    AIX_Toolbox_noarch   AIX noarch repository          295
    repolist: 3,343
    # 


    Just to be sure, there is no lock on the sudo package? If so, this would be set in /opt/freeware/etc/yum/yum.conf.




    ------------------------------
    Christian Brüssow
    Teamlead and Principal Software Engineer
    Cenit AG
    Stuttgart
    ------------------------------



  • 10.  RE: Installing new sudo 1.9.5p2 package on AIX OS

    Posted Fri February 05, 2021 09:10 AM
    How did you update your local yum repo? 
    If the repo is correct then it could be problem of local yum cache.
    Please clear the yum cache and try installing again.
    # yum clean all
     


    ------------------------------
    SANKET RATHI
    ------------------------------



  • 11.  RE: Installing new sudo 1.9.5p2 package on AIX OS

    Posted Fri February 05, 2021 01:30 PM
    Sanket,

    I did several times "yum clean all" on yum client several times during my testing ... below are my repos and commands I am using to sync.

    on 7.1 yum client:  .... samething on 7.2 except 71 changed to 72
    --> yum repolist
    AIX_Toolbox | 2.9 kB 00:00
    AIX_Toolbox/primary_db | 2.2 MB 00:00
    AIX_Toolbox_71 | 2.9 kB 00:00
    AIX_Toolbox_71/primary_db | 107 kB 00:00
    AIX_Toolbox_noarch | 2.9 kB 00:00

    repo id                          repo name                      status
    AIX_Toolbox                AIX generic repository         3,612
    AIX_Toolbox_71          AIX 7.1 specific repository   182
    AIX_Toolbox_noarch    AIX noarch repository      251
    repolist: 4,045

    I am running below 2 commands to download rpms and create repo  each time I want to sync.. Are these right ? Please confirm.

    reposync -p /usr/IBMAHS/htdocs/aixtoolbox -r AIX_Toolbox
    createrepo /usr/IBMAHS/htdocs/aixtoolbox/AIX_Toolbox    ........repeat same 2 comands other repos

    ------------------------------
    Nag N
    ------------------------------



  • 12.  RE: Installing new sudo 1.9.5p2 package on AIX OS

    Posted Fri February 05, 2021 01:33 PM
    Actually I am specifying -a ppc with repo sync 

    reposync -p /usr/IBMAHS/htdocs/aixtoolbox -r AIX_Toolbox -a ppc
    createrepo /usr/IBMAHS/htdocs/aixtoolbox/AIX_Toolbox

    ------------------------------
    Nag N
    ------------------------------



  • 13.  RE: Installing new sudo 1.9.5p2 package on AIX OS

    Posted Mon February 08, 2021 02:39 AM
    The commands are looking fine for me. If you not already know, you can verify the local repo installation process by this IBM document: https://developer.ibm.com/technologies/systems/articles/configure-yum-on-aix/

    Are you referencing the local repository in your yum.conf (/opt/freeware/etc/yum/yum.conf) via the baseurl setting on the AIX? The base URL should look like this: "baseurl=http://<your repo server>/<target path>/AIX_Toolbox".

    ------------------------------
    Christian Brüssow
    Teamlead and Principal Software Engineer
    Cenit AG
    Stuttgart
    ------------------------------



  • 14.  RE: Installing new sudo 1.9.5p2 package on AIX OS

    Posted Tue February 09, 2021 09:55 AM
    Is your issue resolved ?
    Have you verified that after reposync the rpms are getting in the specific directories. 
    Is your yum.conf file correctly pointing to the local yum repo. 
    I am not seeing any issue in usage.

    ------------------------------
    SANKET RATHI
    ------------------------------



  • 15.  RE: Installing new sudo 1.9.5p2 package on AIX OS

    Posted Tue February 09, 2021 03:25 AM
    I had same problem.
    There was sudo- 1.8.15-1noldap .ppc in AIX Tool box. but there is newer one.
    So I read INSTALL file in sudo.tar.gz 1.9.5p2, I found the bellow guide.

    --with-ldap[=DIR]
    Enable LDAP support. If specified, DIR is the base directory
    containing the LDAP include and lib directories. Please see
    README.LDAP for more information.

    Was the newest sudo rpm file configured and build with --with-ldap option?
    To configure and build without --with-ldap option personlly resolve this problem?
    And will the newer sudo-noldap rpm be released forever?



    ------------------------------
    YUTAKA ANZAI
    ------------------------------



  • 16.  RE: Installing new sudo 1.9.5p2 package on AIX OS

    Posted Tue February 09, 2021 09:47 AM
    Yes the sudo rpm package is built with ldap support and it needs openldap.
    But now we have also published sudo_noldap rpm package that does not require openldap.

    ------------------------------
    SANKET RATHI
    ------------------------------



  • 17.  RE: Installing new sudo 1.9.5p2 package on AIX OS

    Posted Thu February 11, 2021 02:29 AM
    ​Thanks for the info but I have tried the new version sudo_noldap and I am getting below error.

    # rpm -Uvh --test sudo_noldap-1.9.5p2-1.aix6.1.ppc.rpm
    error: failed dependencies:
            gettext >= 0.19.8.1 is needed by sudo_noldap-1.9.5p2-1
            zlib >= 1.2.11-1 is needed by sudo_noldap-1.9.5p2-1
            sudo conflicts with sudo_noldap-1.9.5p2-1

    sudo conflicts with sudo_noldap-1.9.5p2-1   ???How can I fix it? Any suggestions?

    ------------------------------
    Sanket Mehta
    ------------------------------



  • 18.  RE: Installing new sudo 1.9.5p2 package on AIX OS

    Posted Thu February 11, 2021 02:30 AM
    sudo, sudo_ids and sudo_noldap are exclusive to each other only one package can be installed because they provide same files that would conflict. 
    So in your case if you want sudo_noldap then you will have to remove existing sudo from your system.

    ------------------------------
    SANKET RATHI
    ------------------------------



  • 19.  RE: Installing new sudo 1.9.5p2 package on AIX OS

    Posted Tue February 16, 2021 03:59 PM
    Ok so finally I am able to install sudo version as below however I am getting error when I check the version of the sudo.

    # rpm -qa sudo
    sudo-1.9.5p2-1.ppc
    # which sudo
    /usr/bin/sudo
    # ls -al /usr/bin/sudo
    lrwxrwxrwx    1 root     system           27 Feb  9 15:35 /usr/bin/sudo -> ../../opt/freeware/bin/sudo
    # sudo -V
    ksh: sudo: cannot execute

    I used to able to view the sudo version.
    Currently no LIBPATH has been set. Please suggest on how to fix the error.

    Thanks,
    Sanket

    ------------------------------
    Sanket Mehta
    ------------------------------



  • 20.  RE: Installing new sudo 1.9.5p2 package on AIX OS

    Posted Wed February 17, 2021 11:35 AM
    Hi Sanket,

    Can you please here? What am I supposed to do?

    # rpm -qa sudo
    sudo-1.9.5p2-1.ppc
    # which sudo
    /usr/bin/sudo
    # ls -al /usr/bin/sudo
    lrwxrwxrwx    1 root     system           27 Feb  9 15:35 /usr/bin/sudo -> ../../opt/freeware/bin/sudo
    # sudo -V
    ksh: sudo: cannot execute

    I used to able to view the sudo version.
    Currently no LIBPATH has been set. Please suggest on how to fix the error.

    Thanks,
    Sanket

    ------------------------------
    Sanket Mehta
    ------------------------------



  • 21.  RE: Installing new sudo 1.9.5p2 package on AIX OS

    Posted Wed February 17, 2021 11:42 AM
    Please send output of following commands

    # ls -l ​/opt/freeware/bin/sudo
    # ls -l /opt/freeware/bin/sudo_32
    ​​# cksum ​/opt/freeware/bin/sudo_32


    ------------------------------
    SANKET RATHI
    ------------------------------



  • 22.  RE: Installing new sudo 1.9.5p2 package on AIX OS

    Posted Wed February 17, 2021 12:19 PM
    # ls -l ​/opt/freeware/bin/sudo
    /opt/freeware/bin/sudo not found
    # ls -l /opt/freeware/bin/sudo_32
    ---s--x--x    1 root     system       169038 Jan 27 12:29 /opt/freeware/bin/sudo_32
    # cksum ​/opt/freeware/bin/sudo_32
    cksum: ​/opt/freeware/bin/sudo_32: No such file or directory​

    ------------------------------
    Sanket Mehta
    ------------------------------



  • 23.  RE: Installing new sudo 1.9.5p2 package on AIX OS

    Posted Wed February 17, 2021 12:57 PM
    Edited by SANKET RATHI Wed February 17, 2021 01:00 PM
    You can see sudo links are not correct. Something broke your system. The sudo symlinks are not proper. 
    Also I do not understand why cksum failed when ls is showing sudo_32
    Anyway I would recommend to reinstall sudo package and see if links are getting corrected.
    Also try running ​/opt/freeware/bin/sudo_32 this should work. 



    ------------------------------
    SANKET RATHI
    ------------------------------



  • 24.  RE: Installing new sudo 1.9.5p2 package on AIX OS

    Posted Wed February 17, 2021 01:12 PM
    # yum remove sudo
    Setting up Remove Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package sudo.ppc 0:1.9.5p2-1 will be erased
    --> Finished Dependency Resolution

    Dependencies Resolved

    =============================================================================================================================================================
     Package                           Arch                             Version                                  Repository                                 Size
    =============================================================================================================================================================
    Removing:
     sudo                              ppc                              1.9.5p2-1                                @AIX_Toolbox                               17 M

    Transaction Summary
    =============================================================================================================================================================
    Remove        1 Package

    Installed size: 17 M
    Is this ok [y/N]: y
    Downloading Packages:
    Running Transaction Check
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
    Warning: RPMDB altered outside of yum.
    ** Found 2 pre-existing rpmdb problem(s), 'yum check' output follows:
    krb5-libs-1.16.1-5.ppc has missing requires of db >= ('0', '6.2.32', '1')
    krb5-libs-1.16.1-5.ppc has missing requires of libdb6.a(libdb-6.2.so)
      Erasing    : sudo-1.9.5p2-1.ppc                                                                                                                        1/1
    warning: /etc/sudoers saved as /etc/sudoers.rpmsave

    Removed:
      sudo.ppc 0:1.9.5p2-1

    Complete!
    # yum install sudo
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package sudo.ppc 0:1.9.5p2-1 will be installed
    --> Finished Dependency Resolution

    Dependencies Resolved

    =============================================================================================================================================================
     Package                           Arch                             Version                                   Repository                                Size
    =============================================================================================================================================================
    Installing:
     sudo                              ppc                              1.9.5p2-1                                 AIX_Toolbox                              4.2 M

    Transaction Summary
    =============================================================================================================================================================
    Install       1 Package

    Total download size: 4.2 M
    Installed size: 4.2 M
    Is this ok [y/N]: y
    Downloading Packages:
    sudo-1.9.5p2-1.aix6.1.ppc.rpm                                                                                                         | 4.2 MB  00:00:01
    Running Transaction Check
    Running Transaction Test
    Transaction Test Succeeded
    Running Transaction
      Installing : sudo-1.9.5p2-1.ppc                                                                                                                        1/1

    Installed:
      sudo.ppc 0:1.9.5p2-1

    Complete!
    # sudo -V
    Sudo version 1.9.5p2
    Configure options: --prefix=/opt/freeware --sbindir=/opt/freeware/sbin --libdir=/opt/freeware/lib --mandir=/opt/freeware/man --libexecdir=/opt/freeware/libexec --with-logging=syslog --with-logfac=auth --with-pam --with-pam-login --with-env-editor --with-ignore-dot --with-aixauth --with-tty-tickets --with-ldap --with-ldap-conf-file=/opt/freeware/etc/openldap/ldap.conf​


    Thanks! I removed the sudo from my test server and re-install it back again and it worked! However I am not sure why does it even happen?

    FYI--after installing yum, I have ran "yum install sudo" instead of "yum upgrade sudo" . Do you think this causes the issue? Since the sudo was already there in the system.

    ------------------------------
    Sanket Mehta
    ------------------------------



  • 25.  RE: Installing new sudo 1.9.5p2 package on AIX OS

    Posted Wed February 17, 2021 01:20 PM
    FYI--

    I am still getting the same results as before for below outputs..

    # ls -l ​/opt/freeware/bin/sudo
    /opt/freeware/bin/sudo not found
    # ls -l /opt/freeware/bin/sudo_32
    ---s--x--x    1 root     system       169038 Jan 27 12:29 /opt/freeware/bin/sudo_32
    # cksum ​/opt/freeware/bin/sudo_32
    cksum: ​/opt/freeware/bin/sudo_32: No such file or directory



    ------------------------------
    Sanket Mehta
    ------------------------------



  • 26.  RE: Installing new sudo 1.9.5p2 package on AIX OS

    Posted Thu February 11, 2021 10:31 AM
    I had same issue, removed existing and installed sudo_ids-1.9.5p2-1.ppc  fresh using yum, but  it said "This sudo is built with /etc/sudo-ldap.conf " . I thought it is no ldap but not sure why it said used sudo-ldap.conf file. 

    --> Running transaction check

    ---> Package sudo_ids.ppc 0:1.9.5p2-1 will be installed

    --> Finished Dependency Resolution

     

    Dependencies Resolved

     

    ================================================================================

    Package           Arch         Version              Repository            Size

    ================================================================================

    Installing:

    sudo_ids          ppc          1.9.5p2-1            AIX_Toolbox          4.9 M

     

    Transaction Summary

    ================================================================================

    Install       1 Package

     

    Total download size: 4.9 M

    Installed size: 19 M

    Downloading Packages:

    Running Transaction Check

    Running Transaction Test

    Transaction Test Succeeded

    Running Transaction

      Installing : sudo_ids-1.9.5p2-1.ppc                                       1/1

    This sudo is built with /etc/sudo-ldap.conf as the ldap configuration file. Run "sudo -V" to check build configure options

     



    ------------------------------
    Nag N
    ------------------------------