- Assembly 95.3%
- Makefile 4.7%
| vs6 | Include README in VS6 project | |
| .editorconfig | Initial import | |
| .gitignore | Add VS6 project and instructions | |
| LICENSE.md | Include license | |
| Makefile | Fix and use ${NASM} | |
| README.md | README tweaks | |
| sudo.asm | Revert "Zero-terminate tail string" | |
SUDO for DOS
SUDO command ...
An implementation of sudo for DOS, to run the given command with full privileges.
Examples
Editing important system files:
C:\>sudo edit config.sys
Disk partitioning:
C:\>sudo fdisk
How it works
SUDO examines the environment for the COMSPEC variable to find the default command interpreter, falling back to C:\COMMAND.COM if not set. The interpreter is then executed in unprotected real mode for full privileges.
If a file SUDOERS.SYS is present in the root directory of the boot drive, it is ignored.
Building
Requires NASM:
nasm -f bin -o sudo.com sudo.asm
There is also a Makefile and a Visual Studio 6 project (in vs6/).
Running SUDO directly from the command line will only work on DOS or 32-bit Windows. On modern 64-bit Windows, or other operating systems, you'll need to use something like DOSBox for testing.
Author
By Sijmen J. Mulder (ik@sjmulder.nl). Licensed under the 2-clause BSD license.