On Tue, 2003-02-11 at 09:30, Robert Tinsley wrote: > On Tue, 2003-02-11 at 15:13, Robert E. Martin wrote: > > >this shouldn't be necessary for root on a stock red hat box, provided > > >you "su -" rather than just "su". could you try that and see whether it > > >works for you? > > > Yes this does work. Why is this different from the older versions of > > bash? Is this a new alias in the shell itself? security? > > "su -" (or "su -l") means that the target user's shell will be a "logon > shell". in practice, this means that: > > 1. environment variables will be set up as if you had logged in directly > as that target user (generally root), rather than inheriting them from > the original user > > 2. your directory will change to the target user's home directory > > what is helping you here is that with a login shell on a standard red > hat box, root gets a different PATH to the other users. specifically, > root's PATH will contain /sbin where 'ifconfig' lives. >
you can also add /sbin and /usr/sbin to your path in ~/.bash_profile so you can find ifconfig, ntpq et.al. I have seen posts that freak about regular users having these in their paths but I can't figure out why. The security is in the devices and the perms on them and sometimes in the program itself that behave differently if the UID = 0. NOT by obfuscating the location. I may be missing something here but I have yet to hear a valid argument why this is not a good idea for a user (me) that administers many systems and hates being root unless I have to be. Bret -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe https://listman.redhat.com/mailman/listinfo/redhat-list