On Tue, Jun 24, 2003 at 01:36:18PM -0400, Derrick 'dman' Hudson wrote: > On the ("new") debian server at work, my boss wants bash to be in > 'emacs' mode when he su's to root. I work with 'vi' mode, however. > Is there some way for the .bashrc to recognize whether he su'd to root > or I did and set the editing mode appropriately?
ps a -f | grep $PPID | grep -v root | cut -f 1 -d ' ' gives the username of the user who su'd. -- Pigeon Be kind to pigeons Get my GPG key here: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x21C61F7F
pgp00000.pgp
Description: PGP signature