Troubleshooting Section - Shebangs and a toor alternative
In general I would concur that the shebangs are usually sufficient to ensure that most scripts run in the proper shell. And I run fish as my normal user and have run it as the root shell in the past. That being said not all scripts are properly written. In particular scripts with a #!/bin/sh have been known to contain bash specific syntax as most linux systems use bash in bourne compatability mode for /bin/sh (I think debian uses dash, and the BSDs still have bourne shell)
If someone is truely paranoid about a critical script being run they should of course run the default shell. But these methods seem hackish ways to keep the default shell and use fish. Why not go the old root/toor route and have two users with the same uid/gid different names and different shells. I actually run all of my root accounts like this with bash as root and fish as toor just in case something is broken and expecting bash.
To get a toor account that uses fish run:
# useradd -ou 0 -g 0 toor # passwd toor # chsh -s /usr/bin/fish toor
And then instead of
su toor and everything else is the same as root (even the prompts say root) you just have a different shell. I imagine that the same could be done with a regular user say 'johndoe' and a user 'johndoefish' that has a different default shell.
Not publishing this on the page without comment since toor has been superceeded for it's intended use purposes (it was used for recovering root but now we have single user mode and bin isn't seperate anymore). However, the concept seems transferable to the question at hand as the desire is to have one user with two shells and that is one thing toor was used for.