Jan 252018
 

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.

  2 Responses to “Change Default Shell in NAS4Free”

Comments (2)
  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.

    • 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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>