Re: tcsh stays in /usr/bin
For what it's worth, I encourage local sysadmins to leave root's shell
alone, regardless of unix variant, and then "su" from their own account
with the following script. It starts up a root shell that's a copy of
your $SHELL, with your own $HOME. Actually, I usually use a bash
function that flushes the history (history -w) first, so root sees the
commands I just typed a second ago. I sometimes get NFS write errors
from bash trying to update my ~/.bash_history file when it doesn't have
permission - these can safely be ignored.
#!/bin/sh
#set -x
if [ "$1" = "" ]
then
user=root
else
user="$1"
fi
case "$0" in
groot|*/groot)
case "`domainname`" in
YPea.oac.uci.edu)
GSU=/ori/local/bin/gsu
;;
*)
GSU=gsu
;;
esac
exec $GSU "$user" -c 'exec sh -c "HOME='"$HOME"'; \
PATH='"$PATH"'; \
SHELL='"$SHELL"'; \
export HOME PATH SHELL; exec '$SHELL'"'
;;
root|*/root)
exec su "$user" -c 'exec sh -c "HOME='"$HOME"'; \
PATH='"$PATH"'; \
SHELL='"$SHELL"' \
export HOME PATH SHELL; exec '$SHELL'"'
;;
esac
You can safely ignore the gsu stuff - it's kinda like su, but not
really. It's a local thing.
Brian C. White wrote:
>
> > Well, after Dominik Kubla (csh maintainer) contacted me and gave me some
> > advises, I decided to:
> >
> > - leave tcsh in /usr/bin;
>
> I thought one of the things you were trying to do was to allow 'tcsh'
> to be used as the login shell for "root"?
>
> Brian
> ( bcwhite@verisim.com )
>
> -------------------------------------------------------------------------------
> measure with micrometer, mark with chalk, cut with axe, hope like hell
>
> --
> TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
> debian-devel-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com
Reply to: