]> git.armaanb.net Git - opendoas.git/blob - README.md
remove pam.d configuration files
[opendoas.git] / README.md
1 # OpenDoas: a portable version of OpenBSD's `doas` command
2
3 `doas` is a minimal replacement for the venerable `sudo`. It was
4 initially [written by Ted Unangst](http://www.tedunangst.com/flak/post/doas)
5 of the OpenBSD project to provide 95% of the features of `sudo` with a
6 fraction of the codebase.
7
8 At the moment only linux with GLIBC or musl libc is supported and tested.
9
10 ## Building and installing
11
12 ```
13 $ ./configure
14 $ make
15 # make install
16 ```
17
18 ## About the port
19
20 This is not an official port/project from OpenBSD!
21
22 As much as possible I've attempted to stick to `doas` as tedu desired
23 it. As things stand it's essentially just code lifted from OpenBSD with
24 PAM or shadow based authentication glommed on to it.
25
26 Compatibility functions in libopenbsd come from openbsd directly
27 (`strtonum.c`, `reallocarray.c`, `strlcpy.c`, `strlcat.c`),
28 from openssh (`readpassphrase.c`) or from sudo (`closefrom.c`).
29
30 The PAM and shadow authentication code does not come from the OpenBSD project.
31
32 ### pam configuration
33
34 I will not ship pam configuration files, they are distribution specific and
35 its simply not safe or productive to ship and install those files.
36
37 If you want to use opendoas on your system and there is no package that
38 ships with a working pam configuration file, then you have to write and
39 test it yourself.
40
41 A good starting point is probably the distribution maintained `/etc/pam.d/sudo`
42 file.
43
44 ### Perist/Timestamp/Timeout
45
46 The persist feature is disabled by default and can be enabled with the configure
47 flag `--with-timestamp`.
48
49 This feature is new and potentially dangerous, in the original doas, a kernel API
50 is used to set and clear timeouts. This API is openbsd specific and no similar API
51 is available on other operating systems.
52
53 As a workaround, the persist feature is implemented using timestamp files
54 similar to sudo.
55
56 See the comment block in `timestamp.c` for an in-depth description on how
57 timestamps are created and checked to be as safe as possible.