rbashを使用してユーザーを作成するには、デフォルト設定を変更するか、さらに設定を追加してください。

rbashを使用してユーザーを作成するには、デフォルト設定を変更するか、さらに設定を追加してください。

rbashを使用してユーザーを作成するときに設定を変更または追加する方法

useradd peter2 -s /bin/rbash

この記事を見つけました。制限されたユーザーを作成しますが、デフォルト設定を変更したいと思います。 制限付きシェルを使用してLinuxユーザーが実行できる操作を制限する方法

6.10 限られたエンクロージャ

次の追加変更が必要な場合:

Bashを制限されたシェルとして実行すると、一部のユーザー機能が削除されます。特に、ユーザーは次のことができません。

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.
  • これらの制限はどこに保存されますか?

  • その他のコマンドの追加または削除

ベストアンサー1

おすすめ記事