Change Default Shell in NAS4Free

Albeit I love almost everything about NAS4Free and his cousin FreeNAS, I can never get adjusted to its shell choice. It might be that tcsh is an awesome shell, but I am much more accustomed to bash.

Standard FreeBSD (and Linux) approach is to use chsh command. However, that command is not present in NAS4Free. Fortunately, there is an alternative choice.

Command pw offers that and much more. To change shell, we simply execute the following command:

# pw user mod root -s /bin/bash

While we cannot make this default, we can add it under System, Advanced, Command Scripts. If we add this command as Post Init script, the next login will greet us with bash prompt.

[2018-07-22: NAS4Free has been renamed to XigmaNAS as of July 2018]
[2018-08-13: This change does result loss of console menu. There is a slightly different method without that downside.]

4 thoughts to “Change Default Shell in NAS4Free”

  1. That tip was actually very helpful, I had been trying the chsh quite many times now…

    Take note though, it is highly recommended never to change root shell, as it may introduce unknown issues.

    1. True, albeit risk is quite low on NAS4Free currently since all its scripts explicitly specify the shell.

      Of course, there is always a possibility of someone introducing script without #! and that might cause unintended consequences.

Leave a Reply to Erlend Falch Cancel reply

Your email address will not be published. Required fields are marked *