troubleshooting not working !!

Dominic Mitchell dom at
Sun Jul 30 22:59:26 BST 2000

On Sat, Jul 29, 2000 at 03:21:20PM +0100, Roger Hardiman wrote:
> fasi74 wrote:
> > 
> > Although i have reinstall my BSD & now every thing is fine but dont wana go
> > through this again ....
> > 
> > what should  have i done ?
> I always install shells from the ports collection (usually tcsh).

tcsh?  Yech.  Mind you, it's even in the base system as of 4.1  :-(

Please, try zsh!  It's great!

> Then, assuming I am changing the default shell for root, I do this
> 1) log on as root at the console (text) screen
> 2) run vipw to edit the password file and change the shell for the user
> you want to change
>    - or run chsh
> 3) DO NOT exit this shell. Stay logged in after editing vipw
> 4) Use ALT+F2 to change to a new text screen.
> 5) log in on this screen.
> This will test the new shell you have set up.
> If you can log in, the everything is OK
> If you cannot log in, you know your setup of the new shell is incorrect.
> 6) Press ALT+F1 to switch back to the original screen where you are
> still logged
> in as root.
> re-run vipw (or chsh) to fix any mistakes.
> The key to this is to keep at least one 'root' login open at all times.

One thing I have to add to all this, is *please* ensure that the shell
you choose for root is statically linked (before switching it!).  To
find out whether it is or not, use the ldd(1) command.  For example,
running ldd on each shell on my system gives these results:

ppe:~% ldd `grep -v \# /etc/shells `        
ldd: /bin/sh: not a dynamic executable
ldd: /bin/csh: not a dynamic executable
ldd: /bin/tcsh: not a dynamic executable
/usr/local/bin/zsh: => /usr/lib/ (0x280b4000) => /usr/lib/ (0x280f5000)
/usr/local/bin/bash: => /usr/lib/ (0x280af000) => /usr/lib/ (0x280d4000) => /usr/lib/ (0x280da000) => /usr/lib/ (0x2811b000)
ldd: /usr/local/bin/ksh: not a dynamic executable

Now, the ones which respond with "not a dynamic executable" are OK to
use as a root shell.  The ones which don't aren't.

The reasoning behind this is that if you login to a system that doesn't
have /usr available, then you're *completely* screwed because the shared
libraries it needs are under /usr.  Note that you should probably copy
your new root shell to somewhere on the root partition, for the same

BTW, the file(1) command will also tell you whether a binary is
statically or dynamically linked.

Try Zope!

More information about the Ukfreebsd mailing list