doas
doas (“do as”) is a program to execute commands as another user. The system administrator can configure it to give specified users privileges to execute specified commands. It is free and open-source under the ISC license[2] and available in Unix and Unix-like operating systems.
Original author(s) | Ted Unangst |
---|---|
Developer(s) | OpenBSD Projects[1] |
Initial release | 18 October 2015[1] |
Repository | |
Written in | C |
Type | Security software |
License | ISC license |
Website | https://man.openbsd.org/doas |
doas was developed by Ted Unangst for OpenBSD as a simpler and safer sudo replacement.[3][4]
History
doas was originally developed by Ted Unangst[5] and was released with OpenBSD 5.8 in October 2015 replacing sudo.[1] However, OpenBSD still provides sudo as a package.[1]
Configuration
Definition of privileges should be written in the configuration file, /etc/doas.conf.[6]
Examples
Allow user1 to execute procmap as root without password:
permit nopass user1 as root cmd /usr/sbin/procmap
Allow members of the wheel group to run any command as root:
permit :wheel as root
Ports and availability
Jesse Smith’s[7] port of doas is packaged for DragonFlyBSD,[8] FreeBSD,[9] and NetBSD.[10] According to the author, it also works on illumos and macOS.[11] OpenDoas, a Linux port, is packaged for Alpine, Arch, Gentoo, GNU Guix, Hyperboloa, Manjaro, Parabola, NixOS, and Void Linux.[12]
References
- "OpenBSD 5.8". www.openbsd.org. Retrieved 2020-05-06.
- https://cvsweb.openbsd.org/src/usr.bin/doas/doas.c?rev=1.82
- Yegulalp, Serdar (2016-07-25). "OpenBSD 6.0 tightens security by losing Linux compatibility". InfoWorld. Retrieved 2020-05-06.
- Millman, Rene (18 October 2019). "Linux Sudo bug could allow hackers root access". SC Media UK. SC Media UK. Retrieved 2020-05-06.
- – OpenBSD General Commands Manual
- "Privileges | OpenBSD Handbook". www.openbsdhandbook.com. Retrieved 2020-05-06.
- https://github.com/slicer69
- https://github.com/DragonFlyBSD/DPorts/tree/master/security/doas
- https://svnweb.freebsd.org/ports/head/security/doas/pkg-descr
- "The NetBSD Packages Collection: security/doas". ftp.netbsd.org. Retrieved 2020-05-06.
- Smith, Jesse. "doas". GitHub. Retrieved 2020-08-24.
- "opendoas". repology.org.