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

Re: automatic root shell initialization



On Tue, Jun 24, 2003 at 10:09:51PM +0100, Pigeon wrote:
| 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.

Beautiful!  That's exactly what I wanted.

-D

-- 
(A)bort, (R)etry, (T)ake down entire network?
 
http://dman13.dyndns.org/~dman/

Attachment: pgpqmb4a8U5up.pgp
Description: PGP signature


Reply to: