XigmaNAS Booting Directly Into Shell

One of my XigmaNAS machines had a curious issue. Upon boot, it wouldn't display the console menu. After boot it would go directly to the bash prompt - no password asked. While practical, this was completely insecure as anyone capable of connecting monitor and keyboard would get a full access.

Upon checking configuration, culprit was obvious - I changed the default shell. As console menu execution is part of .cshrc configuration file and bash ignores that file, the console menu was forever lost.

I definitely didn't like that.

Since I really wanted bash prompt but also preferred to have the console menu (that can be disabled), I decided upon a slightly different shell selection approach without system-wide consequences . Simply adding exec bash command at the end of .cshrc works nicely without the nasty side-effects The following PostInit script will do the trick:

printf '\\nif ($?prompt) then\\n\\texec bash\\nendif\\n' >> /root/.cshrc

And yes, check if we're working with interactive shell ($?prompt part) is necessary because commands executed without terminal (e.g. directly over SSH or cron jobs) will fail otherwise.

4 thoughts to “XigmaNAS Booting Directly Into Shell”

  1. After some messing around with latest versions same effect appeared here. – Reticulus (revision 688). Can you advise how to make it go back to the default behavior?

  2. i have upgraded to the 6881 with extended webgui installed, the gui stopped working. then decided to downgrade it to the 666, switched off extended gui, then upgrade. the result is everything is working fine with the exception of the login prompt on the console, as you describe above

Leave a Reply

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