Ticket #556 (closed defect: fixed)

Opened 12 years ago

Last modified 10 years ago

chsh.moira shouldn't use /etc/shells

Reported by: jdreed Owned by: lizdenys
Priority: normal Milestone: Upstream Utopia
Component: -- Keywords:
Cc: Fixed in version:
Upstream bug:

Description

chsh.moira should not use /etc/shells as the list of acceptable shells, since that list is not static. Really, it should yell very loudly at you if you try and change your shell to anything other than /bin{,/athena}/{tc,ba}sh.

For example, if I run chsh.moira on Linerva, and choose zsh, that will be fine, since zsh is installed on Linerva. If I then log into a cluster machine, I will be very sad and will end up with weird screw cases. For example, I can launch gnome-terminal (which will run bash for me, for some reason), but not xterm (which will error out saying /usr/bin/zsh does not exist).

We can either use a file in AFS (and require AFS), or we can ship /etc/shells.moira which contains /bin/athena/bash, /bin/athena/tcsh, /bin/bash, and /bin/tcsh.

Ideally, we'd follow up and change this upstream.

Change History

comment:1 Changed 12 years ago by jdreed

Alternatively, we ship /etc/shells.moira, which contains the "official" choices. If a shell is not in there, but is in /etc/shells, inform the user that this may screw them over. If a shell is not listed in either location, prevent the user from selecting it.

comment:2 Changed 12 years ago by lizdenys

  • Owner set to lizdenys
  • Status changed from new to accepted

Submitted in  moira:5673

comment:3 Changed 12 years ago by lizdenys

Fixed moiradev's issue with sysconfdir and resubmitted the patch in  moira:5674

comment:4 Changed 11 years ago by jdreed

  • Milestone changed from Summer 2010 (Lucid Deploy) to Fall 2010

comment:5 Changed 11 years ago by jdreed

  • Milestone changed from Fall 2010 to Upstream Utopia

comment:6 Changed 10 years ago by jdreed

  • Status changed from accepted to closed
  • Resolution set to fixed

This got taken upstream.

comment:7 Changed 10 years ago by geofft

  • Status changed from closed to reopened
  • Resolution fixed deleted

We also need to install it in our packaging. Fixed in r25344.

comment:8 Changed 10 years ago by geofft

  • Status changed from reopened to committed

comment:9 Changed 10 years ago by jdreed

  • Status changed from committed to closed
  • Resolution set to fixed

comment:10 Changed 10 years ago by jdreed

  • Status changed from closed to reopened
  • Resolution fixed deleted

Guess why this didn't work when Geoff tested it:

#ifndef HAVE_GETUSERSHELL

comment:11 Changed 10 years ago by jdreed

This was fixed in r4048 and now works, but deployment is blocking on #888.

jdreed@infinite-loop:~$ grep ksh /etc/shells
/usr/bin/ksh
/bin/ksh
jdreed@infinite-loop:~$ grep ksh /etc/shells.moira
jdreed@infinite-loop:~$ chsh.moira 
Changing login shell for jdreed.
Finger information last changed on 29-aug-2011 11:24:50
by user jdreed@ATHENA.MIT.EDU with chsh.
Current shell for jdreed is /bin/athena/bash.
New shell: /bin/ksh
/bin/ksh is not available.
jdreed@infinite-loop:~$

comment:12 Changed 10 years ago by jdreed

  • Status changed from reopened to development

comment:13 Changed 10 years ago by jdreed

  • Status changed from development to proposed

comment:14 Changed 10 years ago by jdreed

  • Status changed from proposed to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.