Skip to contentSkip to conversation

DOS Console Graphics- not as root

DISCUSSION C Leonard 2 participants 2 messages Apr 6, 2004

lore
Share & tools
lore

C Leonard

author
#0 lore raw

Greetings Programs,
I know this has been answered, but I have only found pieces of the solution. I am a newbie to linux, so if you could answer with step-by-step instructions, I'd sure appreciate it. The question?

How to run DOS Graphics on console, not as root user?

Right now I've got things running great as root. But because this system is used by many different users, I can't just leave the root terminal open. I need users on the machine, to able to run dosemu with the DOS console graphics features available to root, but have those users log in as themselves.

I've seen rumors that this is supposed to work
-----------

# addgroup dos
# adduser me dos
# adduser buddy dos

Then, make /usr/bin/dos setuid root and executeable only by group 'dos':

# chown root.dos /usr/bin/dosemu
# chmod 450 /usr/bin/dosemu

Now, only users in group 'dos' can run dosemu and it will run as root.
-----------

I tried this- but no luck.
It runs the reduced graphics functional DOS.
Am I missing a step? Is this the right approach for addressing this problem?

What do I need to do, to properly configure my system? I use the Debian distro.
I'm starting with dosemu -kVt
Any help would be most appreciated.

-Carl Leonard

__________________________________________________________________
Introducing the New Netscape Internet Service.
Only $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups. Download now at http://channels.netscape.com/ns/search/install.jsp

#1 lore raw
Quoted 10 lines · C Leonard

How to run DOS Graphics on console, not as root user?

I've seen rumors that this is supposed to work
-----------

# addgroup dos
# adduser me dos
# adduser buddy dos

Then, make /usr/bin/dos setuid root and executeable only by group 'dos':

Quoted 7 lines
# chown root.dos /usr/bin/dosemu
# chmod 450 /usr/bin/dosemu

Now, only users in group 'dos' can run dosemu and it will run as root.
-----------

I tried this- but no luck.

The problem is that /usr/bin/dosemu is a script, and scripts can't (and should not for security reasons) be run suid-root.

Quoted 2 lines

It runs the reduced graphics functional DOS.
Am I missing a step? Is this the right approach for addressing this problem?

The program you need to apply this too is /usr/bin/dosemu.bin. You might also need to edit /etc/dosemu/dosemu.users. By default it gives you console graphics only but I think the Debian setup is a little more conservative.

If you use dosemu-1.2.0 or higher then it's better (a little more secure) to use sudo (see README.txt, Security), since sudo has the same effect as suid-root for DOSEMU -- will switch back to normal user -- but more fine-grained access checking, and allows you to have one single non-privileged dosemu.bin executable.

"dosemu -s" implies "sudo dosemu.bin" which detects sudo, drops privileges, and switches back to joeuser.

sudo dosemu (if that's allowed) runs dosemu with full root rights.

Bart