-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreadme.txt
46 lines (35 loc) · 1.2 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
The dosu.c program
DATE: 2023.03.12
Written by: HASHELQ
LICENSE: MIT
This is a sudo alternative in case you need a simple bloat-free program for this task.
Environment:
DOSU_PROMPT to set a custom prompt, for example:
$ DOSU_PROMPT="[DOSU] Enter password: " dosu echo 123
[DOSU] Enter password:
SECURITY:
I am not sure if this program is secure.
Use at your own risk.
Also I recommend to take a look at the code before you start using it.
If a vulnerability found, please make an issue or a PR.
SUID:
This program is intended to be run with +s permission (setuid).
Before start using it, add +s and change owner to root: "chmod +s ./dosu ; chown root:root ./dosu"
This is a short program that
1. Checks if the user is in the group "dosu"
2. Checks if the entered password is correct for the user
3. Runs specified program as ROOT if all requirements above are meet.
Usage:
dosu <any program> <any other argument>
Note:
There is no a prompt by default.
Just type your password after you run the program.
In other cases, it returns an uppercased error code.
Here is a list of error codes:
* SETUID: *error message*
* NO_CMD
* NO_SUID
* NO_PASSWORD
* WRONG_PASSWORD
* SYS_NO_DOSU_GROUP
* USR_NO_DOSU_GROUP