SUMMARY .cshrc owned by ???

SUMMARY .cshrc owned by ???

Post by Mike deRuit » Sat, 12 Mar 1994 04:17:53



        Thanks to all those who replied to my original posting.

Quote:

>    Is there anyway to have the .cshrc owned by someone other than the
>    user?

        The idea was to have the users .cshrc owned by root or an
        admin account. Having discovered that this is not possible
        we will now look into the ways to achieve the result.

        For those who are interested below are some off the
        responses/suggestions from the net. Generally it was either
        switch to tcsh or source a global .cshrc file from each
        users .cshrc.



> >       Is there anyway to have the .cshrc owned by someone other than the
> >       user?

> No.  This is a security feature in the csh.  (Prevents people with group/world
> writable home directories from getting a silly .cshrc.  Why not do give
> all users a .cshrc that reads:

>    source /the/global/Cshrc/file

> Casper

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



> ->
> ->      Is there anyway to have the .cshrc owned by someone other than the
> ->      user?
> ->

>    You can get a copy of tcsh which has a global .cshrc feature
> along with a lot of other excellent features.  Preventing users from
> modifying their own cshrc file like you are trying to do is a bad
> idea.
> --
> Jason C. Austin


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


Mike>        We would like to have a default .cshrc file for all our users
Mike> to set up a few network wide aliases which users cannot
Mike> edit/accidentally delete. Users will have the opportunity to
Mike> customize their own .mycshrc

Switch to tcsh.

It has support for global .cshrc and .login (usually called
/etc/csh.cshrc and /etc/csh.login) built-in.

IMHO, tcsh is much superior to csh - command-line editing, filename
completion, visual stepping through history list, more and more.

  Michal

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


    Mike> We would like to have a default .cshrc file for all our users to set
    Mike> up a few network wide aliases which users cannot edit/accidentally
    Mike> delete. Users will have the opportunity to customize their own
    Mike> .mycshrc

You may have already received this suggestion, but have you looked into
tcsh?   Tcsh is a csh compatible shell that reads the following upon
startup:

    1.  /etc/csh.cshrc   (global .cshrc)
    2.  /etc/csh.login   (global .login; for login shells only)
    3.  ~/.tcshrc        (user shell setup)
    4.  ~/.cshrc         (only if ~/.tcshrc wasn't found)
    5.  ~/.login         (for login shells only)

This is what we're using and have been very pleased with the results.
Tcsh also allows using the arrow keys for command line editing, which
is much nicer for our users coming from the VMS environment.

Amos

Lt Mike de Ruiter                               Smail:  TSG Building

                                 \\\\\//                Private Bag 32901
Ph :+64 9 4455809                |     |                Auckland
Fax:+64 9 4455475                (.) (.)                NEW ZEALAND
============================oOO====(_)====OOo================================
No employer is allowed to have the opinions I have and therefore are
not
responsible for them.
=============================================================================

 
 
 

1. .cshrc owned by ???

        We would like to have a default .cshrc file for all our users to set
        up a few network wide aliases which users cannot edit/accidentally
        delete. Users will have the opportunity to customize their own
        .mycshrc

        The original idea was to have a link from all the users home accounts
        to a setup directory for files like .cshrc.

        We tried the above, but on logging in as the user the .cshrc was not
        executed.

        We recreated the link, with the link owned by the user, but still did
        not have any success

        It doesn't work either with a .cshrc physically in the users
        directory, but owned by someone else.

        The only way we got the .cshrc file to work was to have it owned by
        the user, which we don't want.

        I know there is a system (machine) wide .login/.profile in the /etc
        directory. This would be a reasonable workaround as we will have
        X-terminals connecting to a couple of servers, but there does not
        appear to be (from AnswerBook and experience) allowance for a system
        wide .cshrc file. We cannot use the .login file for aliases.

        Is there anyway to have the .cshrc owned by someone other than the
        user?

        I'll open it up even further and ask if there are any suggestions on
        how I should achieve what I want to do, and the adviseability of this
        approach.

Lt Mike de Ruiter                               Smail:  TSG Building

                                 \\\\\//                Private Bag 32901
Ph :+64 9 4455809                |     |                Auckland
Fax:+64 9 4455475                (.) (.)                NEW ZEALAND
============================oOO====(_)====OOo================================
No employer is allowed to have the opinions I have and therefore are not
responsible for them.
=============================================================================

2. Apache 2.0.28 Beta is now available!

3. global cshrc files ? (SUMMARY)

4. f2ps etc

5. Own Your Own Power Company!

6. tar only certain directories

7. I want to own my own server. Help!

8. Mandrake 6: ksymoops error building kernel on full install

9. how do you put your own machines in your own DNS server?

10. SUMMARY - dial-in/dial-out on the same port - SUMMARY

11. SUMMARY: NEEDED - SQL Summary

12. *AGAIN* CSH - Execute `target' .cshrc with `su'

13. .cshrc and at-jobs ($prompt is set)