Assuming that ksh is installed. If not yum install ksh
Create the link
ln -sf /bin/ksh93 /bin/rksh
Make the login shell of the user point to /bin/rksh i.e.
usermod -s /bin/rksh username
The user will not have now access to
- Change the current working directory
- Set the value of the SHELL, ENV, or PATH variables
- Specify the pathname of a command containing a / (slash)
- Redirect output of a command with > (right caret), >| (right caret, pipe symbol), <> (left caret, right caret), or >> (two right carets).
Edit /etc/kshrc
and append at the end of the file the following
if [ “$0” = “-rksh” ]
then
alias awk=''
alias ls=''
alias python=''
alias perl=''
alias vi='rvim'
alias vim='rvim'
fi