Bash rbash
Programmieren
Basiswissen
Kein Befehl sondern Konzept zur Erzeugung eines begrenzten Benuterzaccounts
Eigenschaften
Im Restricted Modus geht folgendes nicht:
- Changing directories with cd
- Setting or unsetting the valüs of SHELL, PATH, ENV, or BASH_ENV
- Specifying command names containing /
- Specifying a file name containing a / as an argument to the . builtin command
- Specifying a filename containing a slash as an argument to the -p option to the hash builtin command
- Importing function definitions from the shell environment at startup
- Parsing the valü of SHELLOPTS from the shell environment at startup
- Redirecting output using the >, >|, , >&, &>, and >> redirection operators
- Using the exec builtin command to replace the shell with another command
- Adding or deleting builtin commands with the -f and -d options to the enable builtin command
- Using the enable builtin command to enable disabled shell builtins
- Specifying the -p option to the command builtin command
- Turning off restricted mode with set +r or set +o restricted.
Der rbash Modus wird vom Root-User in der Datei /etc/passwd manuell als Textänderung gesetzt:
Unbegrenzter Modus für Benutzer buba:
buba:x:100:101::/home/vivek:/bin/bash
Beschränkter Modus für Benutzer buba:
buba:x:100:101::/home/vivek:/bin/rbash