使用 rbash 创建用户时如何更改或添加更多设置
useradd peter2 -s /bin/rbash
我发现这篇文章创建了一个受限用户但想更改默认配置 如何使用受限 Shell 来限制 Linux 用户可以执行的操作
当我想做出更多类似的改变时:
当您将 Bash 作为受限 shell 运行时,用户的某些功能将被删除。具体来说,用户不能:
Use cd to change the working directory.
Change the values of the $PATH , $SHELL , $BASH_ENV , or $ENV environmental variables (but they can read the current values).
Read or change $SHELLOPTS shell environmental options.
Redirect the output of a command.
Invoke commands that require a path to locate them. That is, you can’t issue a command that has one or more forward slashes “/” in it.
Invoke exec to substitute a different process for the shell.
Use any of the restricted features in a script.
这些限制存储在哪里
添加或删除更多命令