From 82b48d867ddc490760bb57e8260d2679a9f329ec Mon Sep 17 00:00:00 2001 From: Jesse Buhagiar Date: Wed, 14 Apr 2021 12:23:55 +1000 Subject: Userland: Implement `pls`, a sudo clone --- Base/etc/sudoers | 4 ++++ Base/usr/share/man/man8/pls.md | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 Base/etc/sudoers create mode 100644 Base/usr/share/man/man8/pls.md (limited to 'Base') diff --git a/Base/etc/sudoers b/Base/etc/sudoers new file mode 100644 index 0000000000..a301b3aac1 --- /dev/null +++ b/Base/etc/sudoers @@ -0,0 +1,4 @@ +# sudoers file +# Put any users you want to allow to run programs as root here +root +anon diff --git a/Base/usr/share/man/man8/pls.md b/Base/usr/share/man/man8/pls.md new file mode 100644 index 0000000000..3bf540d374 --- /dev/null +++ b/Base/usr/share/man/man8/pls.md @@ -0,0 +1,41 @@ +## 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 +the sudoers file. + +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 +/etc/sudoers - List of users that can run `pls` + +## Examples + +```sh +$ pls whoami +Password: +root +$ +``` + +```sh +$ pls sh +Password: +# whoami +root +# +``` -- cgit v1.2.3