Some hints for running dosemu as a normal user.
-----------------------------------------------


1. You have to make 'dos' suid root, this normally is done when you
   run 'make install'.

2. Have the users that are allow to execute dosmu in /etc/dosemu.user
   Format:

     loginname [ c_strict ] [ classes ...] [ c_dexeonly ] [ other ]

   For details see ./doc/README.config. For a first time _easy_ installation
   you may set it as follows (but don't to enhance it later !!!):

     root c_all
     all c_all

3. The msdos partitions, that you want to be accessable per 'lredir' should
   be mounted with proper permissions. I recommend to do this via 'group',
   not via user owner ship. Given you have a group 'dosemu' for this and want
   to give the user 'lermen' access, then the following should be

   - in /etc/passwd:
     lermen:x:500:100:Hans Lermen:/home/lermen:/bin/bash
                  ^^^
                  note: this is _not_ the group id of 'dosemu'
   - in /etc/group:
     users:x:100:
     dosemu:x:200:dosemu,lermen
              ^^^
   - in /etc/fstab:
     /dev/hda1 /dosc msdos defaults,gid=200,umask=002 0 0
                                        ^^^
   ( often forgotten: the changes to passwd,group only take place for the
     _next_ login, so don't forget to re-login )

   The fstab entry will mount /dosc such that is has the proper permissions
   ( drwxrwxr-x  22 root     dosemu      16384 Jan  1  1970 /dosc )
   The same you can do with an explicit mount command:
      mount -t msdos -o gid=200,umask=002 /dev/hda1 /dosc 

   Of course normal lredir'ed unix directories should have the same permissions

4. Make sure you have read/write permissions of the devices you
   configured (in /etc/dosemu.conf) for serial and mouse.


Starting with dosemu-0.66.1.4 there should be no reason against running
dosemu as a normal user. The privilege stuff has been extensively overworked,
and there was no program that I tested under root, that didn't also run
as user. However, given you suspect problems resulting from the fact that
you run as user, you first should try configuring dosemu with the
'runasroot' option (see setup-dosemu tool). This lets dosemu permanently run
as (suid) root and only gain user privileges, when accessing secure relevant
resources. Normally  dosemu will permanently run as user and only temporary
take over root privilege when needed.


Hans Lermen, Apr. 6, 1997
