Sudo su – root command is not working in Solaris, however su with full path sudo /usr/bin/su – root is working.

Sudo su – root  command is not working in solaris, however su with full path sudo /usr/bin/su – root is working. Facing this issue only with Solaris. What could be the issue here?

Parents
  • Hello Krishna,
    I have replied via the service request that you have opened for this issue.

    In summary:

    su can be found in three different places on Solaris:
    ---------------------

    /bin/su        

    /sbin/su           (actually a link to /bin/su)

    /usr/bin/su

    ---------------------

     

    When just running 'sudo su - root' it is finding one of these locations, however the one it finds first does not match the path that you have in your sudoers file (/bin/su)

    I would recommend adding the path that it does find into the sudoers file for the Solaris systems.
    E.g:
    user ALL=(ALL) /bin/su - root, /sbin/su - root

     

    Alternatively you can update the PATH order under the 'secure_path' variable in Sudoers.
    However I would recommend updating the sudoers file itself to avoid affecting other commands.

     Please can you reply via the service request.

Reply
  • Hello Krishna,
    I have replied via the service request that you have opened for this issue.

    In summary:

    su can be found in three different places on Solaris:
    ---------------------

    /bin/su        

    /sbin/su           (actually a link to /bin/su)

    /usr/bin/su

    ---------------------

     

    When just running 'sudo su - root' it is finding one of these locations, however the one it finds first does not match the path that you have in your sudoers file (/bin/su)

    I would recommend adding the path that it does find into the sudoers file for the Solaris systems.
    E.g:
    user ALL=(ALL) /bin/su - root, /sbin/su - root

     

    Alternatively you can update the PATH order under the 'secure_path' variable in Sudoers.
    However I would recommend updating the sudoers file itself to avoid affecting other commands.

     Please can you reply via the service request.

Children
No Data