pleaseedit1
A tool for access elevation.
Usage
please /bin/bash
pleaseedit /etc/fstab
pleaseedit [-r/--reason
"new
fs"]
/etc/fstab
pleaseedit [-g/--group
groupname]
filename
pleaseedit [-t/--target
username]
filename
please [-a/--allowenv
list]
please [-c/--check]
/etc/please.ini
please [-d/--dir
directory]
command
please [-e/--env
environment]
command
please [-g/--group
groupname]
command
please [-h/--help]
please {[-t/--target
username]
backup
tar
-cvf
-
/home/data | }
please {[-u/--user
username]
backup
tar
-cvf
-
/home/data | }
please [-l/--list]
please [-l/--list]
[-t/--target
username]
please [-l/--list]
[-u/--user
username]
please [-n/--noprompt]
command
please [-p/--purge]
please [-w/--warm]
Overview
please and pleaseedit are sudo alternatives that have regex support and a simple approach to ACL.
The aim is to allow admins to delegate accurate principle of least privilege access with ease. please.ini allows for very specific and flexible regex defined permissions.
pleaseedit adds a layer of safety to editing files. The file is copied to /tmp, where it can be updated. When EDITOR exits cleanly the file is copied alongside the target, the file will then be renamed over the original, but if a exitcmd is configured it must exit cleanly first.
|
allow environments separated by , to be passed through |
|---|---|
|
will check the syntax of a |
|
will change directory to |
|
run or edit as groupname |
|
print help and exit |
|
to list rules |
|
will not prompt for authentication and exits with a status of 1 |
|
will purge your current authentication token for the running user |
|
will add |
|
to execute command, or edit as target |
|
to execute command, or edit as target |
|
print version and exit |
|
will warm an authentication token and exit |
Example usage
- please -t httpd /bin/bash
-
run a shell as the httpd user
- please -l
-
to list what you may run
- please -t "username" -l
-
to show what username may run.
usernamemust match the target regex in atype=listrule
- please -r 'reloading apache2, change #123' systemctl reload apache2
-
to reload apache2 with a reason
- pleaseedit -r 'adding new storage, ticket #24365' /etc/fstab
-
to use pleaseedit to modify
fstab
Please see please.ini for configuration examples.
Files
/etc/please.ini
Contributions
I welcome pull requests with open arms. New features always considered.
Releases
2 releases since Debian 11 (Bullseye); the text changed 1 time.