[comp.unix.questions] tcsh

don@vax1.acs.udel.EDU (Donald R Lloyd) (05/22/89)

       Sometime during the winter, tcsh was installed on the vax1 here.  I've    been trying to change from csh to tcsh for a while now with no luck whatsoever. I no several people who have changed over with no problems, but I can't seem to get it to work.  I've tried the following:

     chsh tcsh
     chsh /usr/local/tcsh
     chsh tcsh /users/ (my user ID #)
     chsh /usr/local/tcsh /users/(my #s again)

      All of which do absolutely nothing.  No error message, no change of shell, nothing.
      When I use:
         passwd -s /usr/local/tcsh
      I get a 'permission denied'.
      chsh in any other combination I've tried tells me I must specify either    csh or sh.  I know tcsh is in /usr/local, and I know a number of people have    made it their default shell.  What am I doing wrong?  
      The only other solution I've come up with is to put 'tcsh' as the first    line in my .cshrc file, but that screws things up, too.

                                    Thanks,

benji@hpfcdq.HP.COM (Jeff Benjamin) (05/24/89)

> Sometime during the winter, tcsh was installed on the vax1 here.
> I've been trying to change from csh to tcsh for a while now with
> no luck whatsoever.  I no several people who have changed over
> with no problems, but I can't seem to get it to work.  I've
> tried the following:
>  
>       chsh tcsh
>       chsh /usr/local/tcsh
>       chsh tcsh /users/ (my user ID #)
>       chsh /usr/local/tcsh /users/(my #s again)

The proper usage for chsh is: chsh name [ shell ]

This is on HP-UX, which is Berkely-derived and SysV compatible.
The name (your login name) is NOT optional, though the shell is
( it defaults to Bourne shell /bin/sh ).

Try "chsh don /usr/local/tcsh"

-----
Jeff Benjamin                         {ucbvax,hplabs}!hpfcla!benji
Graphics Technology Division          benji%hpfcla@hplabs.HP.COM
Hewlett Packard Co.                   Fort Collins, Colorado	

chris@uxf.cso.uiuc.edu (Chris Martin) (05/25/89)

In article <8170001@hpfcdq.HP.COM> benji@hpfcdq.HP.COM (Jeff Benjamin) writes:
>The proper usage for chsh is: chsh name [ shell ]
>
>This is on HP-UX, which is Berkely-derived and SysV compatible.
>The name (your login name) is NOT optional, though the shell is
>( it defaults to Bourne shell /bin/sh ).
>
>Try "chsh don /usr/local/tcsh"


It isn't always that simple.  Here's an excerpt from our man page on
a Pyramid 90x with OSx 4.4.

SYNOPSIS
     chsh name [ shell ]

DESCRIPTION
     ...
                                      If no shell is specified,
     then the shell reverts to the default login shell /bin/sh.
     Otherwise,	only /bin/csh, /bin/oldcsh, /bin/tcsh, or
     /usr/new/csh can be specified as the shell	unless you are
     the super-user.


=============================================================================
Christopher Martin           \        INTERNET:  chris@uxf.cso.uiuc.edu 
University of Illinois       /\       UUCP:      uunet!uiucuxc!uxf!chris 
at Urbana-Champaign         /  \      BITNET:    chris@uiucuxf            
=============================================================================

frank@zen.co.uk (Frank Wales) (05/26/89)

In article <8170001@hpfcdq.HP.COM> benji@hpfcdq.HP.COM (Jeff Benjamin) writes:
>> Sometime during the winter, tcsh was installed on the vax1 here.
>> I've been trying to change from csh to tcsh for a while now with
>> no luck whatsoever.  
>
>The proper usage for chsh is: chsh name [ shell ]
>
>This is on HP-UX, which is Berkely-derived and SysV compatible.
>The name (your login name) is NOT optional, though the shell is
>( it defaults to Bourne shell /bin/sh ).
>
>Try "chsh don /usr/local/tcsh"

chsh(1) is unreasonably restrictive regarding what it will let you have
as a shell.  On HP-UX (s800/3.01), only /bin/sh, /bin/csh or /bin/ksh
may be specified.  Even if you are root, you must specify one of these.
Indeed, even HP's own "shell", /usr/bin/pam, is not acceptable to chsh.
[Maybe there should be an /etc/shelltab, which lists allowed shells.]
--
Frank Wales, Systems Manager,        [frank@zen.co.uk<->mcvax!zen.co.uk!frank]
Zengrange Ltd., Greenfield Rd., Leeds, ENGLAND, LS9 8DB. (+44) 532 489048 x217 

jdpeek@RODAN.ACS.SYR.EDU (Jerry Peek) (05/27/89)

In article <3693@udccvax1.acs.udel.EDU> don@vax1.acs.udel.EDU (Donald R Lloyd) writes:
> I've been trying to change from csh to tcsh for a while now with no
> luck whatsoever. I no several people who have changed over with no
> problems, but I can't seem to get it to work

> chsh in any other combination I've tried tells me I must specify
> either csh or sh.  I know tcsh is in /usr/local, and I know a number
> of people have made it their default shell.  What am I doing wrong?

I'm not sure this will help, because you say other users have been able to
change shells.  Maybe they had a superuser edit the /etc/passwd file directly
and set tcsh as their login shell.

But a lot of systems (I'm not sure which) have a file called /etc/shells. 
It lists the shells you can use as a login shell.  If you have one of these
on your system, be sure that /usr/local/tcsh is listed on one line of the
file.  (See the getusershell(3) man page.)  Without /etc/shells, you can't
chsh to anything but sh and csh (on the systems I know about, at least).

BTW, /etc/shells is there for security.  Don't put untested shells in the file.

--Jerry Peek; Syracuse University Academic Computing Services; Syracuse, NY
  jdpeek@rodan.acs.syr.edu, jdpeek@suvm.bitnet
  +1 315 443-3995

guy@auspex.auspex.com (Guy Harris) (05/28/89)

>[Maybe there should be an /etc/shelltab, which lists allowed shells.]

Or "/etc/shells", which would have the advantage of being compatible
with 4.3BSD and systems that have adopted its conventions (or code).

rbj@dsys.icst.nbs.gov (Root Boy Jim) (05/31/89)

? From: Jerry Peek <jdpeek@rodan.acs.syr.edu>

? /etc/shells is there for security.  Don't put untested shells in the file.

No it's not. It's there for the SA's piece of mind when J. Random Hacker's
turbo-charged replacement shell core dumps and he can't log in and has
to ask Mr. Root Person to `cp /bin/sh ~jrh/bin/tcrsh' until the next bug.
Note that this still allows `echo exit | tee .cshrc .login > .profile'.

Perhaps /etc/shells was designed to avoid using a suid or guid shell
that I currently cannot execute. If so, then let that be the
requirement, or ban suid, gid, and sticky bit files altogether. Much
simpler, and more flexible.

A reasonable compromise would allow anything in /bin.

? --Jerry Peek; Syracuse University Academic Computing Services; Syracuse, NY
?   jdpeek@rodan.acs.syr.edu, jdpeek@suvm.bitnet
?   +1 315 443-3995

	Root Boy Jim is what I am
	Are you what you are or what?

duncan@dg-rtp.dg.com (W. Lee Duncan) (05/31/89)

In article <3693@udccvax1.acs.udel.EDU> don@vax1.acs.udel.EDU (Donald R Lloyd) writes:
>
> [...]
>  I've tried the following:
>
>     chsh tcsh
>     chsh /usr/local/tcsh
>     chsh tcsh /users/ (my user ID #)
>     chsh /usr/local/tcsh /users/(my #s again)
> [...]

Note that the shell names that chsh(1) will accept are *compiled in*!
So, if it won't take your requests to change your shell talk to your
system administrator.  He/She can either (1) just edit the /etc/passwd
file (assuming a non-YP system, of course), or (2) if source for
chsh(1) is around, update/recompile it.

--
W. Lee Duncan, Data General, RTP     - "How can you be two places at once
UUCP: {world}!mcnc!rti!dg-rtp!duncan -  when you're really no place at all"
DOMAIN: duncan@dg-rtp.dg.com         -                Firesign Theatre

pete@northstar89 (Peter Robert Schmitt) (06/01/89)

In article <6622@xyzzy.UUCP> duncan@rtp48.dg.com (W. Lee Duncan) writes:
>In article <3693@udccvax1.acs.udel.EDU> don@vax1.acs.udel.EDU (Donald R Lloyd) writes:
>Note that the shell names that chsh(1) will accept are *compiled in*!
>So, if it won't take your requests to change your shell talk to your
>system administrator.  He/She can either (1) just edit the /etc/passwd
>file (assuming a non-YP system, of course), or (2) if source for
>chsh(1) is around, update/recompile it.


Nope, the valid shells are in a text file called /etc/shells.  Just add a line
to that file (your sysadmin has to do it most probably) that points to where
your tcsh is located.

bert@opusc.CS.SCAROLINA.EDU (Bert Still) (06/02/89)

In article <13721@dartvax.Dartmouth.EDU>, pete@northstar89 writes:
>>  In article <3693@udccvax1.acs.udel.EDU> don@vax1.acs.udel.EDU writes:
>>  Note that the shell names that chsh(1) will accept are *compiled in*!
>>  So, if it won't take your requests to change your shell talk to your
>>  system administrator.  He/She can either (1) just edit the /etc/passwd
>>  file (assuming a non-YP system, of course), or (2) if source for
>>  chsh(1) is around, update/recompile it.
> Nope, the valid shells are in a text file called /etc/shells.  Just add
> a line to that file (your sysadmin has to do it most probably) that
> points to where your tcsh is located.

Well.... The /etc/shells construction is not yet universally used on
BSD based systems (forget System V for a moment here -- I can't recall
having seen chsh on System V.3...).  For example, our VAX-11/750 runs
MtXinu-4.3 and uses /etc/shells; however, our Sun-4/260s run SunOS
Sys4-3.2, which does not use /etc/shells.  Thus, both of you are
"right" although Don's suggestion of using the good old ``vipw''
will always work (supposing ``vipw'' exists ;-)

					bert@cs.scarolina.edu



-- 
Domain:  bert%opus@cs.scarolina.edu   #####   BITNET:  T410119@UNIVSCVM
LarynxNet: Bert Still
AcadNet: Computer Services Division, University Of South Carolina

gallo@hartmanis.albany.edu (Andrew Gallo) (07/12/90)

	First off, thanks to everyone who responded to my question about 
	unprintable characters in a filename (?filename).

	My question: I am using tcsh as my login shell.  However, I am unable
	to use wildcards in filenames (*filename*) or things like
	'cd ~username'.  Do you know what might cause this?  Is there something
	I should be enabling/disabling in my startup files?

	Please send responses via email.

	Thanks.

>-----------------------------------------------------------------------------<
> Andy Gallo             | Dept of Computer Sci |  "If six, turned out to be  <
> gallo@cs.albany.edu    |    SUNY at Albany    |   nine,  I don't mind..."   <
>-----------------------------------------------------------------------------<