

# User specific environment and startup programs These commands are taken from the environmental PATH variable which is set in /home/localuser/.bash_profile.

Now if you check, the user localuser can access all commands which he/she has allowed to execute. programs # mkdir /home/localuser/programsĤ. Create a directory under /home/localuser/, e.g. Then the user localuser is chrooted and can't access the links outside his home directory /home/localuserģ. While creating user: # useradd -s /bin/rbash localuserįor existing user: # usermod -s /bin/rbash localuserįor more detailed information on this, please check the KBase Article 8349 Modify the target user for the shell as restricted shell The normal user has been given permission to execute some commands which are available in /bin/ and /usr/local/bin/, So to remove those permissions and to restrict the user to run only particular set of commands, following steps shall be useful.ġ.Resolutionĭisclaimer : This is just a hack, not recommended for Actual Production Use Need to restrict the normal users to run only limited set of commands assigned to him/her and all other commands for which normal user have permission to execute by-default, shall not be executed.Į.g: user XYZ can run only gzip and gunzip commands.
