[comp.unix.admin] Switching users from csh to sh

darcy@druid.uucp (D'Arcy J.M. Cain) (05/18/91)

In article <FPB.91May17074443@ittc.ittc.wec.com> Frank P. Bresz writes:
[Message from "something like motd question" thread deleted]

>	I am considering switching the bulk of the population from sh to
>csh just so I can more easily customize (via /etc/profile) the way I want
   [ NOTE: later post clarifies he meant csh -> sh ]
>user accounts to behave.  With over 400 users what are the chances that I
>can put something into /etc/profile to correctly switch them to
>.cshrc/.login after giving them information perhaps setting ENV variables
>or whatever.  I know I can exec csh but I can't be certain what the right
>thing to do is.  Any help appreciated.
Sounds like you are telling your users which shell they have to use.  Why
not let them have whatever shell they want and have the following line in
both /etc/profile and /etc/cshrc:
    /bin/sh startup.stuff

where startup.stuff is common login functions (motd, news, set terminal etc)
and leaves you with one place to make mods that apply to everyone.

-- 
D'Arcy J.M. Cain (darcy@druid)     |
D'Arcy Cain Consulting             |   There's no government
Toronto, Ontario, Canada           |   like no government!
+1 416 424 2871                    |

rowe@cme.nist.gov (Walter Rowe) (05/21/91)

Having each user do something like "/bin/sh startup.stuff" doesn't allow
the startup script to define environment variables for user (like MANPATH).

We (well, one person is doing all the work) are working on an m4 script
that will generate a common .cshrc and .profile that each user can source
from his/her .cshrc/.profile.  They can choose to not reference it if they
wish.  By `source'-ing rather than executing you get the advantage that I
wanted above (environment variables stay around).

wpr
---
Walter Rowe             rowe@cme.nist.gov           ...!uunet!cme-durer!rowe
National Institute of Standards and Technology / U.S. Department of Commerce