- Assembly 95.3%
- Makefile 4.7%
| vs6 | ||
| .editorconfig | ||
| .gitignore | ||
| LICENSE.md | ||
| Makefile | ||
| README.md | ||
| sudo.asm | ||
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 ([email protected]). Licensed under the 2-clause BSD license.