[CentOS] su path hard coded?

Karl Vogel vogelke+centos at pobox.com
Wed Jul 25 03:27:09 UTC 2012


>> On 07/24/12 4:33 PM, Stephen Harris wrote:
S> I want the ability to "set the default path".  That's all.

>> On Tue, Jul 24, 2012 at 04:43:54PM -0700, John R Pierce wrote:
J> set it in /etc/profile then.  that gets run on su -l $someuser

>> On Tue, 24 Jul 2012 19:53:23 -0400, Stephen Harris wrote:
S> Who says all my users run "/bin/sh" or "/bin/bash" as their shell?  Do I
S> need to need to handle /etc/csh.login?  And what about non-standard
S> shells?

   It sounds like your best bet would be to change the source for su, and
   just be prepared to reinstall it if/when yum (or whatever) replaces it.

   Being able to specify the default PATH without having to mess with shell
   setup files is a nice feature; Solaris allows you to do this by providing
   an /etc/default/su file to set the PATH plus other things like whether you
   want to use syslog for access logging, etc.

   Why not change the production version to use (say) /etc/sysconfig/su for
   the default PATH?  This way any admin can tweak su behavior to suit
   themselves without messing with the code, especially critical code like
   this.

-- 
Karl Vogel                      I don't speak for the USAF or my company

Linus Torvalds takes one look at your desktop and knows which p*rn sites
you visited.  In the last ten years.



More information about the CentOS mailing list