If a file SUDOERS.SYS is present in the root directory of the boot drive, it is ignored.
Just like Microslop would have done it!
If a file SUDOERS.SYS is present in the root directory of the boot drive, it is ignored.
Just like Microslop would have done it!
Real joke: Being advertised as .com file, actually compiles to .exe format (which is funnier because by later DOS versions a lot of the .com files that came with DOS were actually .exe files)
The interpreter is then executed in unprotected real mode for full privileges.
Good thing I'm running sudo from real mode so it can elevate me to real mode
I thought DOS didn't have users, meaning you were root by default
Interesting timing since there is sudo in one of the latest Windows preview builds…
M$ sudo has been around for a while as a dev setting iirc.
Microsoft officially introduced a native sudo command for Windows with the release of Windows 11 Insider Preview Build 26052, which was announced on February 8, 2024.
That, to me, is "recently". :)
Since when did DOS have any system level permissions? Maybe something after version 6 but I thought literally anyone could run anything at any time. Was a loooooooooong time ago though so I’m probably wrong.
But DOS is a single user mode OS?????
If I'm understanding this correctly, it works for protected mode DOS, as in the DOS that Windows 95 and 98 run on top of.
In this case, this implementation of SUDO drops the CPU out of protected mode and runs whatever command in real mode, which is 16 bit 8086 compatible and limited to 1MB of RAM.
Unless I'm missing something here anyways..
Sure, but anyone can sit at that computer. Talking from experience as the kid that used my parents computer running DOS, I could freely edit config.sys and autoexec.bat to the annoyance of my parents.
With SUDO for DOS I can imagine only those authorized will be able to edit important system files.
I don't imagine many people are running DOS on the family computer anymore, but still useful.
That's true! Since there is no privilege separation in DOS, it needs to do no elevation so it can just execute the command directly. But should a future version of DOS implement unprivileged users or age verification, SUDO can be extended to support it.
As far as I can see this doesn't do anything. It just calls int21 0x4B which is just exec. Not related to dpmi or anything like that.
But DOS is a single user mode OS?????
Sure, but anyone can sit at that computer. Talking from experience as the kid that used my parents computer running DOS, I could freely edit config.sys and autoexec.bat to the annoyance of my parents.
With SUDO for DOS I can imagine only those authorized will be able to edit important system files.
I don't imagine many people are running DOS on the family computer anymore, but still useful.
That's true! Since there is no privilege separation in DOS, it needs to do no elevation so it can just execute the command directly. But should a future version of DOS implement unprivileged users or age verification, SUDO can be extended to support it.
If I'm understanding this correctly, it works for protected mode DOS, as in the DOS that Windows 95 and 98 run on top of.
In this case, this implementation of SUDO drops the CPU out of protected mode and runs whatever command in real mode, which is 16 bit 8086 compatible and limited to 1MB of RAM.
Unless I'm missing something here anyways..
As far as I can see this doesn't do anything. It just calls int21 0x4B which is just exec. Not related to dpmi or anything like that.
all 21 comments