[CentOS] su path hard coded?

Mon Jul 23 19:14:45 UTC 2012
Les Mikesell <lesmikesell at gmail.com>

On Mon, Jul 23, 2012 at 2:00 PM, Stephen Harris <lists at spuddy.org> wrote:
> Is there any way of changing the PATH that's set by 'su' to be specific
> to my needs?   It looks like 'su' has the path's hard coded.
>
> % rpm -qf /bin/su
> coreutils-5.97-34.el5_8.1
>
> % strings /bin/su | grep local.bin
> /usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
> /usr/local/bin:/bin:/usr/bin
>
> I could kludge it with pam_env, I guess, but that may have
> more impact than just 'su' and I'd like to avoid side-effects.

Can't you use the usual approach of 'su -' to pick up the target
user's login environment?

-- 
   Les Mikesell
     lesmikesell at gmail.com