Ubuntu16 - useradd or adduser
Hey guys, recently been trying to work on labs 28.1 and 28.2. I am able to complete 28.1 but 28.2 just does not work.
For 28.2 we are supposed to get a restricted shell. Doing rbash -r in the shell works and I cannot change dirs or PATH. However copying "sudo ln /bin/bash /bin/rbash" then creating a "useradd -s /bin/rbash fool" does not work once I "sudo su - fool" then I test changing directories and changing PATH cariable and I am still able to do it.
Using the "useradd" command was not working when trying to create a new home directory. I noticed in ubuntu 16 it is telling me to use "adduser." With "addsuer" I can easily create the home dirs I want, change shell path (but rbash still not working), and remove the user with "deluser" command.
Either way, using "useradd" or "adduser" I cannot get a restricted shell to work once I "sudo su - user."