* Re: Ksh for root?
1999-01-09 5:00 ` Nikola Milutinovic
@ 1999-01-09 5:00 ` Charles M Richmond
1999-01-10 5:00 ` Tim Mooney
1 sibling, 0 replies; 5+ messages in thread
From: Charles M Richmond @ 1999-01-09 5:00 UTC (permalink / raw)
Nikola Milutinovic wrote:
>
> Hans Westerback wrote:
> >
> > Hi,
> >
> > I've noticed that on some systems root has been changed to use korn
> > shell. But earlier I have heard that root should always run Bourne
> > shell. Is this something that has changed in later versions? Are there
> > any problems with running korn shell? What's the official view?
>
> Officially, you should use "the most system" shell for root and those
> are /bin/sh and /usr/bin/sh. The first is statically linked. The idea is
> that root is the system account which is used only for system
> administration.
Both /bin/sh /usr/sbin/sh are dynamically linked.
/bin/sh: COFF format alpha dynamically linked, demand paged executable or
object module stripped - version 3.11-10
/usr/bin/sh: COFF format alpha dynamically linked, demand paged executable
or object module stripped - version 3.11-10
The nonstripped version is:
/sbin/sh: COFF format alpha demand paged executable or object module
stripped - version 3.11-10
However the politically correct shell to use is the linked to ksh -
/bin/posix/sh
/bin/posix:
total 392
12671 -rwxr-xr-x 2 bin bin 270336 Mar 29 1997 sh
/bin:
12671 -rwxr-xr-x 2 bin bin 270336 Mar 29 1997 ksh
>
> I use ZSh on all of my machines for root, because I like it (I've had
> couple of problems with it, but was able to fix them). The main argument
> against using "non-Bourne shell" for root is that it may get broken.
> That is why, on Digital UNIX, when in single user mode, root always gets
> Bourne shell, regardless of what /etc/passwd says about it.
>
> So, use what you like. If it starts messing things up, do: /bin/sh -c
> "YOUR COMMAND" and it should be still OK.
>
> Nix.
--
***********************************************************************
* Charles Richmond Integrated International Systems Corporation *
* cmr@iisc.com cmr@koibito.iisc.com cmr@shore.net *
* UNIX Internals, I18N, L10N, X, Realtime Imaging, and Custom S/W *
* One Longfellow Place Suite 3309 , Boston , Ma. USA 02114-2431 *
* (617) 723 7695 (617) 367 3151 FAX (617) 723 6861 *
***********************************************************************
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Ksh for root?
1999-01-09 5:00 ` Nikola Milutinovic
1999-01-09 5:00 ` Charles M Richmond
@ 1999-01-10 5:00 ` Tim Mooney
1 sibling, 0 replies; 5+ messages in thread
From: Tim Mooney @ 1999-01-10 5:00 UTC (permalink / raw)
In article <3697621A.FA174922@EUnet.yu>,
Nikola Milutinovic <milutinn@EUnet.yu> wrote:
> Hans Westerback wrote:
> >
> > Hi,
> >
> > I've noticed that on some systems root has been changed to use korn
> > shell. But earlier I have heard that root should always run Bourne
> > shell. Is this something that has changed in later versions? Are there
> > any problems with running korn shell? What's the official view?
>
> Officially, you should use "the most system" shell for root and those
> are /bin/sh and /usr/bin/sh. The first is statically linked.
Historically on most versions of Unix that was true (/bin/sh was static), but
that's not true on Digital Unix:
05:14pm dogbert autodeps$odump -Dl /bin/sh
***LIBRARY LIST SECTION***
Name Time-Stamp CheckSum Flags Version
/bin/sh:
libc.so Dec 29 17:09:30 1997 0x5e955f9b 0 osf.1
In fact, most of the stuff in /sbin is not statically linked either.
libc.so resides in the root filesystem (in /shlib) so it's available whenver
the root filesystem is available, but there still is that chance that if
something horrible goes wrong with your shared C library (like during the
patch process) you may not even be able to get a working shell.
On Digital Unix init always starts the Bourne shell when in single user mode,
so I've been pretty comfortable setting root's shell to ksh (a good
compromise) and moving root's home directory to /root (on /, of course) on
all our DU machines.
Tim
--
Tim Mooney mooney@dogbert.cc.ndsu.NoDak.edu
Information Technology Services (701) 231-1076 (Voice)
Room 242-J1, IACC Building (701) 231-8541 (Fax)
North Dakota State University, Fargo, ND 58105-5164
^ permalink raw reply [flat|nested] 5+ messages in thread