[olug] best practices for modifying root's profile in Suse

Tim & Alethea Larson thelarsons3 at cox.net
Wed Mar 24 13:39:35 UTC 2004


dthacker9 at cox.net wrote:

>I'm want to build a standard root prompt with some extra info built into it. The file /etc/profile cautions against modifying it, and suggests that I use /etc/profile.local  I created the /etc/profile.local and added the PS1 string, but didn't seem to get a read on login.   For now I've added a .profile to /root.  Is that the way you usually do this?
>  
>

If there's a change I think is wonderful enough that every user ought to 
have it (aliasing ls to ls -F), then I'll change the core files like 
/etc/profile, but if it's specific to one user then use the 
user-specific files in their own home directory.  If I personally think 
something is a good change but know that some people will disagree with 
my opinion (shell prompts), I'll put it in the files in /etc/skel so 
that new users can more easily find it and comment it out or change it 
to something else.

I typically use a two-line prompt, with time and $PWD in the first line, 
user at host and history number in the second.  I use bash whenever it's 
available, where the history number is useful.  Anyone know how to get 
the current time into a ksh prompt?  Closest I've been able to get is my 
login time.  Also, once upon a time I had a couple lines in my .kshrc to 
allow me to use up and down arrows to scroll my command history, but I 
can't remember or find them anymore.  Anyone have a pointer on that? 
 Going back to ksh after using bash feels like someone cut off a couple 
fingers.

Tim

-- 
Tim & Alethea
www.ChristTrek.org





More information about the OLUG mailing list