Problem: Linux box on Windows domain does not allow the user to set the shell with chsh -s /bin/zsh (or whichever shell). There are no errors, it just doesn't work. Using root, nothing happens either, using chsh -s /bin/zsh user.name to set it for the user gives the error user 'user.name' does not exist in /etc/passwd. You could probably go into the passwd file and make it work but a suitable way is to add to .bashrc
export SHELL=/bin/zsh
exec /bin/zsh -l
This redirects the shell to zsh but also allows you to type "exit" to leave the terminal - not just return to bash.
*NOTE: this should also work if the user does not have root access - like on a shared computer
Showing posts with label Domain. Show all posts
Showing posts with label Domain. Show all posts
Thursday, July 28, 2016
OpenFOAM on Domain Computer
Problem: OpenFOAM does not work linux machine added to a Windows domain. When you source OpenFOAM bashrc file, it overwrites the PATH so no terminal commands are recognized (ls, sudo, etc.)
Solution:
cd /opt/openfoam4/etc (or whichever version is installed)
sudo vim bashrc
comment line 153:
# cleaned=`$foamClean "$PATH" "$foamOldDirs"` && PATH="$cleaned"
save and quit (:wq)
For some reason, this line destroys the path when the machine is on the domain. This is not a problem for machines not on a domain.
*NOTE: for zsh shell, there may be an error stating that "-t" flag is not recognized, if so:
sudo vim config.sh/aliases
delete the "-t" from line 73
the line should read:
[ "$(type wmRefresh)" = "alias" ] && unalias wmRefresh || unset wmRefresh
Solution:
cd /opt/openfoam4/etc (or whichever version is installed)
sudo vim bashrc
comment line 153:
# cleaned=`$foamClean "$PATH" "$foamOldDirs"` && PATH="$cleaned"
save and quit (:wq)
For some reason, this line destroys the path when the machine is on the domain. This is not a problem for machines not on a domain.
*NOTE: for zsh shell, there may be an error stating that "-t" flag is not recognized, if so:
sudo vim config.sh/aliases
delete the "-t" from line 73
the line should read:
[ "$(type wmRefresh)" = "alias" ] && unalias wmRefresh || unset wmRefresh
Labels:
Active Directory,
Domain,
Linux,
OpenFOAM
Subscribe to:
Posts (Atom)