- Create file
/bin/fakeshwith content as below:
#########/bin/fakesh#######
#!/bin/bash
echo -n "$ "
while read cmd ; do
if [ "$cmd" = "exit" ]; then break; fi
if [ "$cmd" != "" ]; then echo "The only one available command is: exit"; fi
echo -n "$ "
done
#########################-
Grant read & exec permission:
chmod +rx /bin/fakesh -
Add
/bin/fakeshto allowed shells for login in file/etc/shells -
Add param
-s /bin/fakeshwhen creating user account