[SunHELP] Changing Root's Shell

Les sunhelp at sunhelp.org
Wed Apr 18 10:39:52 CDT 2001


IMHO here are the reasons to leave the root shell as the
installer leaves it. I'm pretty sure that on some version of
AIX for example, the default shell is ksh.

Assuming that your normal path includes /usr/bin and /sbin
and that both directories and all the library files are available,
there should be no issue.
However, if you look at    /etc/passwd   you will note that on Sol7 the path
for root's shell is specified as /sbin/sh.
If you change it to ksh for example and, for ANY reason, some of the
dynamically
linked files for ksh are not available, ksh blows up instantly when invoked.
If /usr happens to be a separate filesystem and is not mounted,
ksh blows up. You can't even do fsck to fix it.
I am sure that if you viewed this as critical, and you have source, you
could create
a statically linked version of ksh or csh or bash or whatever, but it's
hardly worth the effort.
Even if you copy the shell to /sbin it is still dynamically linked.
As you see below, /sbin/sh and /usr/bin/sh are not links to the same file
either.
By all means I would create another ID 0 user.
Please note the linking and inodes from a listing of the files on a
clean install of Sol7:

for i in /sbin/sh /usr/bin/sh /sbin/ksh /usr/bin/ksh
do
ls -l $i
ls -li $i
file $i
echo
done

-r-xr-xr-x   2 bin      root      257444 Sep  1  1998 /sbin/sh
    341272 -r-xr-xr-x   2 bin      root      257444 Sep  1  1998 /sbin/sh
/sbin/sh:       ELF 32-bit MSB executable SPARC Version 1, statically
linked, stripped

-r-xr-xr-x   3 bin      root       91668 Oct  6  1998 /usr/bin/sh
    126691 -r-xr-xr-x   3 bin      root       91668 Oct  6  1998 /usr/bin/sh
/usr/bin/sh:    ELF 32-bit MSB executable SPARC Version 1, dynamically
linked, stripped

/sbin/ksh: No such file or directory
/sbin/ksh: No such file or directory
/sbin/ksh:      cannot open: No such file or directory

-r-xr-xr-x   2 bin      bin       192764 Oct  6  1998 /usr/bin/ksh
    126698 -r-xr-xr-x   2 bin      bin       192764 Oct  6  1998
/usr/bin/ksh
/usr/bin/ksh:   ELF 32-bit MSB executable SPARC Version 1, dynamically
linked, stripped

I'll shut up now
Les

_______________________________________________________
From: "Adam Douglass" <ns.douglass.adam at mrj.com>
Subject: RE: [SunHELP] Changing Root's Shell


Trust me, you do not want to do this. One of my fellow "sysads" did this and
yesterday much to his dismay he found that he could no longer log into his
machines. Setting up another account with a UID of 0 is a much better idea.

Adam Douglass
System Administrator
Veridian Information Solutions

>>Hi All
>>By changing the root's shell what are the things which get affected in
general?Can someone tell
>>what are the procedures to follow/to take care while changing the shell
for the root user which
>>does'nt hamper the normal performance of the OS(Solaris 7).
>>Thanks in Advance
>>Srinivas





More information about the SunHELP mailing list