SUMMARY: Switching shells on different unix platforms

From: Guy Freeman 071 887 2300 (
Date: Wed Jun 12 1996 - 05:39:00 CDT

Thanks to all who responded. The solution we're now using

1. Set everyones default shell to csh.

2. Create a netgroup containing all the users who wish to
use the ksh. Eg.

        ksh_users (,freemang,) (,smithj,) (,bloggsj,) \
                        (,browns,) (,jonesi,)

3. Add an entry to /etc/passwd on each of our IBM RS6000's
(the only machines where users want use ksh) to force users
belonging to the new netgroup to use ksh. Eg.


Many thanks to Fvd ( and Truck
( for that one.

Other solutions revolved around exec'ing the relevant shell
from within the users .profile or .cshrc or using another
shell like bash or tcsh.

Many thanks again,


>Hi Sun Managers,
>Our setup:-
>Heterogeneous network with:
> Sun (SunOS 4 & 5)
> Silicon Graphics (IRIX)
> IBM RS6000 (AIX)
> HP (HP-UX)
> DEC (OSF1)
>And around 200 users, many of whom use 2 or more platforms.
>And we use NIS.
>The problem:-
>Users need to use different shells on different platforms,
>eg. csh on Sun, ksh on IBM etc.. To allow this we used to
>set csh as there default shell in NIS and override it using
>a "+" entry on all the machines that they required ksh on,
> /etc/passwd...
> +user::0:0:::/bin/ksh
>This was a bit messy, so we tested a different approach.
>set the user's default shell to /bin/defsh and link this
>through to csh or ksh depending on the machine type.
>Although this works it creates other problems:
>1. Certain applications use the SHELL environment variable
>to spawn processes and fail if it's not set to a known
>(like /bin/defsh). We can get round this by setting the
>SHELL to the correct value at the top of the .cshrc /
>2. Programs like ftp won't grant access to users unless
>use a standard shell. On sun's you can get round this by
>adding the shell to /etc/shells but this does not work on
>all platforms.
>I think another approach is needed. Anyone got any other
>Many Thanks,

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:01 CDT