[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: automatic root shell initialization



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

Attachment: pgpPP7WK6CdU2.pgp
Description: PGP signature


Reply to: