SUMMARY: System-Wide Startup

From: Dr. Dave Checketts (checkedg@eee.bham.ac.uk)
Date: Tue Jan 25 1994 - 14:56:36 CST


Sun-Managers,

Recently I posted a question about system-wide startup files as follows:-

>I would like to be able to perform some simple checks when a user
>logs in, e.g. I need to limit the number of logins at any one time
>and/or reduce the priority of some users sessions. Initially
>I tried to do this by making the .cshrc and .login scripts
>owned by root and have them call .login_user and .cshrc_user (owned and
>changeable by the user).
>
>The book says that both files must be owned by the person logging
>in. I have found that this does NOT apply in the case of .login
>but is true for .cshrc. Unfortunately, .cshrc is called first and
>a user can therefore break out of that thus ensuring that .login
>never runs.
>
>Is there any way that I can FORCE a script to be executed by
>each user at login time. I am running Solaris 1.1 and all users come up with
>a C-shell.

I have been overwhelmed by suggestions for which I am very grateful.
Sun Managers beats any support line service.

The solutions offered fitted into one of five basic categories.

1) The C-shell may read from a global .cshrc in /etc IT DOES NOT.

2) Create a link to a global .cshrc in a root owned area and/or
   use 'onintr -' at the start of the script to stops users breaking
    out.

        This can be worked around by users who can easily delete
        links and/or files in their $HOME directories and replace them
        with something else which bypasses the admin imposed setups.

3) Modify /bin/login source to do the tests.

          This would be a solution but is a little more complicated than
        I was hoping for.

4) Write a script to carry out admin tasks and then 'exec' /bin/csh' at
   the end.

        This appeared to be a solution but I found that problems occurred
        when opening additional shelltools/cmdtools etc in openwin.
        I guess this could be sorted with a little more effort but I
        could not see how.

5) The most common suggestion and the one which I choose to follow was
   to replace /bin/csh with Tcsh (public domain).

        I obtained the source for Tcsh and have installed it. It allows
        global setups to be put in /etc/csh.cshrc and /etc/csh.login
        which is ideal for my needs as neither can be altered by users.
        In addition, Tcsh offers a number of additional features over
        /bin/csh such a interactive command line editing (including
        directly from the history list using the cursor controls).
        As well as filename completion it also allows command completion
        based upon the PATH variable.

As yet I have only tried Tcsh out for a limited number of users
but am just about to move everyone over to it. It appears to be
totally compatible with /bin/csh as far as users are concerned.
(Famous last words.....)

May I thank everyone for their help on this one.... (names follow)

jakem@apex.com
bdicaire@vpet.hydro.qc.ca
ma!copley.com!rickn@uu2.psi.com
chip@eniac.seas.upenn.edu
leon@eatworms.swmed.edu
titan!gustavo@enuucp.eas.asu.edu
Ian_MacPhedran@engr.usask.ca
mike_raffety@il.us.swissbank.com
mblisd!isdserv1!drubie@Aus.Sun.COM
Gordon.Rowell@nms.otc.com.au
markus@octavia.anu.edu.au
russ@MATH.ORST.EDU
@ziggy.usf.edu:rauscher@sunflash.eng.usf.edu
ups!uniq.com.au!glenn@warrane.connect.com.au
Andrew@sdsu.edu
eckhard@ts.go.dlr.de
randy@postman.essex.ac.uk
ian@fujitsu-microelectronics-rnd.co.uk
bern@kleopatra.Uni-Trier.DE
feldt@phyast.nhn.uoknor.edu
anderson@neon.mitre.org
acmcr!vr@murphy.com
strombrg@hydra.acs.uci.edu
satyr!kayvan@apple.com

Regards

Dave

***************************************************************************
Dr. Dave G. Checketts | JANET: d.g.checketts@uk.ac.bham
Computer Officer | INTERNET: checkedg@eee.bham.ac.uk
School of Elec. & Elec. Eng., |
University of Birmingham | Telephone: 021 414 4322
Birmingham, B15 2TT, | Fax: 021 414 4291
England
***************************************************************************"



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:08:55 CDT