Hacker News new | ask | show | jobs
by cturner 4232 days ago
You can change the shell for a user in /etc/passwd, or with the command chsh.

It's funny how little things like this affect where you go with systems. On the uni systems, emacs was set up to reformat your code by default (as you typed it in). This drove me bananas, and I didn't realise it was configurable. So I went off and found another editor, and I'm still using it.

1 comments

Just don't change root's shell to something like bash. BAD THINGS WILL HAPPEN.
Care to elaborate? Does FreeBSD make assumptions about the root user's shell that Linux doesn't?
Yes, root's shell should be one provided by the distribution's base install.

I think the biggest worry is that if you need to do something like boot into single user mode for an emergency recovery, and /usr or /usr/local (with root's shell in it) is on a different or unmountable partition then you will not be able to do anything.

Additionally, if you upgrade your shell, or something gets borked, then... you now don't have a shell.
This is one of the reasons for the existence of the 'toor' user, which still uses the default shell
Say there's a failure that forces you to bail into an emergency session where you can't mount /usr/local (which is where bash is typically installed on FreeBSD). All of a sudden, you don't have a shell.

This is a really bad place to be.