AIX Open Source

 View Only
  • 1.  AIX sudo error

    Posted Tue March 01, 2022 12:25 PM
    I am running AIX 7.2 and I have set up RSA Securid on that AIX system. The system is also connected to DNS so there are no local accounts set up. Users login using their username and PASSCODE (RSA Securid). Currently, our cyber team cannot sudo for elevated privileges to do their acas scans. They are able to ssh into the device with no problems. I have tried to sudo with my account but that is failing.

    I am getting the following error:

    sudo: you do not exist in the passwd database.

    I have already installed the sudo rpm from the IBM site, and I have also installed all the krb5 rpms.
    I do not know what to do next for this. Can anyone assist?


    ------------------------------
    Luis Mendez
    ------------------------------


  • 2.  RE: AIX sudo error

    Posted Wed March 02, 2022 03:22 AM
    Can you share the output of " rpm -qa " ?

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



  • 3.  RE: AIX sudo error

    Posted Thu April 28, 2022 06:12 AM
    Hello,

    I have AIX 7.1.5.8 and current installed sudo version is sudo-1.8.11p2-1.ppc. However, I am not able to perform sudo. previously it gave below error,

    ksh: sudo : not found
    but now it is not giving this error but whenever I am trying to do sudo, it is giving below error,

    # sudo su - root
    # pwd
    /home/awazscan

    It is switching to root user. Can you please assist me on this?

    Regards,
    Vineeta Sarkar

    ------------------------------
    Vineeta Sarkar
    ------------------------------



  • 4.  RE: AIX sudo error

    Posted Thu April 28, 2022 01:46 PM
    From where did you install sudo ? 
    I do not see any error in your second output.

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



  • 5.  RE: AIX sudo error

    Posted Fri April 29, 2022 09:19 AM
    Edited by Michael Shon Fri April 29, 2022 09:24 AM
    As a guess, the error might be that using "su -" the directory does not change to "/" , as one would expect from "su -" .

    Assuming that this is the problem that is being asked about ...

    If this only happens using "sudo su -" and does not happen when using "su -" on its own, it is likely to be  side effect of the way sudo has been instructed to configure the environment, passing or not passing certain variables .
    The /etc/sudoers file contains a number of examples of "Defaults" settings making use of env_reset and/or env_keep .

    That said, the "su" command is expected to do the same things no matter how it is invoked.
    The last thing it does - but only if everything goes well before this - is
        session initiation
               If the - flag is specified, the su command initializes the user environment from the values in the user database and the
                /etc/environment file. When the - flag is not used, the su command does not change the directory.

    so when using the "-" argument, it should always set up HOME=/ from /etc/passwd and should always change the directory 

    Perhaps
       some aspect of the actions prior to the session initiation is not going perfectly (although it looks fine in the sample output)
    or
       the user database is coming from some other source (like LDAP) with a different, or missing home

    Check the value for the home directory (I don't know for certain that this will reveal the data from the "true" data source)
           lsuser -f root | grep -i home
          home=/

    This might reveal something
                sudo su  -  -xc "id;/bin/pwd;env"



    You might even have to temporarily add "set -x; env ;" at the first line of files like /etc/profile and /.profile to see what is going on as the shell starts up

    ------------------------------
    Michael Shon
    ------------------------------