[X4U] Setting Shell Defaults for root

Rick Gordon rick at rickgordon.com
Thu Jul 8 12:22:35 PDT 2004


Problem PARTIALLY solved:

Further experimentation shows that adding a .tcshrc file to /private/var/root fixed both the su root problem and the spawning problem while logged in as root. And adding a .tcshrc file to ~ fixed the spawning problem while logged in as myself. I actually used a hard link to create both files:

sudo ln /private/var/csh.login /private/var/root/.tcshrc
ln /private/var/csh.login ~/.tcshrc

But neither fix handles the changes when executing a sudo command. For instance, in all of the previous scenarios my alias of ls to ls -laFTWkov works, but sudo ls still generates a plain ls result.

Still seeking clues.

Rick Gordon

------------------

On 7/8/04 at 11:53 AM -0700, Rick Gordon wrote in a message entitled
"Re: [X4U] Setting Shell Defaults for root":

>Nope. I just tried it and it didn't work. FWIW, /etc is a symbolic link to /private/etc, so my edits in /private/etc/csh.login should have also been recognized according to that consideration.
>
>Rick Gordon
>
>------------------
>
>On 7/8/04 at 1:14 PM -0500, Rod Buchanan wrote in a message entitled
>"Re: [X4U] Setting Shell Defaults for root":
>
>>On 7/8/04 2:22 AM, "Rick Gordon" <rick at rickgordon.com> wrote:
>>
>>>I use tcsh as my default shell, and I have my /private/etc/csh.login file customized with numerous aliases, along with other tweaks.
>>>
>>>...
>>>
>>>Where can I store these commands where they will remain active when I sudo or su root (both of which I do frequently) or spawn a new shell (which I don't do as often)?
>>
>>A quick check of "man tcsh" finds:
>>
>>"A login shell begins by executing commands from the system files /etc/csh.cshrc and /etc/csh.login. ... Non-login shells read only /etc/csh.cshrc and ~/.tcshrc or ~/.cshrc on startup."
>>
> >I'm not a tcsh user but it looks like /etc/csh.cshrc may be what you're looking for.
>

-- 
 
___________________________________________________

RICK GORDON
EMERALD VALLEY GRAPHICS AND CONSULTING
___________________________________________________

WWW:   http://www.shelterpub.com



More information about the X4U mailing list