2021-04-14 12:23:55 +10:00
|
|
|
## Name
|
|
|
|
|
|
|
|
|
|
pls - Execute a command as root
|
|
|
|
|
|
|
|
|
|
## Synopsis
|
|
|
|
|
|
|
|
|
|
```**sh
|
|
|
|
|
$ pls [command]
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Description
|
|
|
|
|
|
|
|
|
|
Executes a command as the root user (uid and gid 0), given that the user executing `pls` is located in
|
2021-04-17 00:55:05 +10:00
|
|
|
the plsusers file.
|
2021-04-14 12:23:55 +10:00
|
|
|
|
|
|
|
|
It is possible to execute commands that contain hyphenated options via the use of `--`, which signifies the
|
|
|
|
|
end of command options. For example:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
$ pls -- ls -la
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Files
|
2021-04-17 00:55:05 +10:00
|
|
|
/etc/plsusers - List of users that can run `pls`
|
2021-04-14 12:23:55 +10:00
|
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
$ pls whoami
|
|
|
|
|
Password:
|
|
|
|
|
root
|
|
|
|
|
$
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
$ pls sh
|
|
|
|
|
Password:
|
|
|
|
|
# whoami
|
|
|
|
|
root
|
|
|
|
|
#
|
|
|
|
|
```
|