by Steffen Krause
Readme for SuSrv - su service for Windows NT 3.51
Introduction
SuSrv is a utility to start programs under specific user accounts in Windows NT 3.51.
It consists of 2 parts:
- susrv - the service that processes requests to start processes for certain users
- sunt - a command-line utility that sends requests to the service
Status
Susrv is freeware. You can use the binaries and the source code for any purpose you like as long as you
don't remove my copyright.
Installation
You have to be logged in as an administrator to install the SuNT Service.
- Expand the susrv.zip file using pkunzip -d susrv.zip
- If you have a non-i386-based computer, build susrv and sut using MS Visual C++. See build hints.
- Copy sunt.exe to a directory in your PATH
- Copy susrv to any directory you like. It must stay there.
- Execute susrv -install
- Open Control Panel->Services, find SuNT Server.
- Click 'Startup', set startup type to 'automatic'. If you want to start only programs on your local
harddisks using susrv, click ok. If you want to start programs on network drives, too, you have to do the following:
- Change 'Log on as' to 'This account'
- Enter the account name and password for the account you want to use for susrv.
You can only start programs using sunt that this account has execute access to !
- Click OK
- Start user manager, open policies->user rights, click 'Show advanced user rights'.
- Give the account the following rights: 'act as a part of the operating system', 'increase quota' and 'assign primary token'.
- Close user manager
- Start the SuNT Server using the 'Start' button.
Using sunt
Usage: sunt program username [password]
where
program: commandline to run, must be quoted if it contains white-spaces
username: username of the account under which to run the program
password: password for the account, if ommitted, sunt asks for it
For instance, if you want to run Control panel as administrator, type:
sunt control administrator
After starting, sunt asks for the password. You can also type in the password on the command line, but everybody can see it in this case.
username can be either a simple username (i.e. Administrator) or domain/Username (i.e. MYDOMAIN/Administrator - thanks to Darrel Schneider).
If you don't specify a domain, sunt tries to log you on first on the local computer and then on the domain which is the calling user logged on to
(i.e. usually the domain the computer belongs to).
Known problems
- The current user in the registery for programs started with sunt isn't set to the correct user. Instead,
the default registery tree is used (i.e. HKEY_CURRENT_USER == HKEY_USERS\Default). This means that all user settings in the registery aren't
available to programs started with sunt.
- Logon-scripts aren't executed.
- Many programs can only have 1 instance. If you start them a second time, the first instance is activated.
So, you have to close the first instance of the program before you can start the program with sunt. Most important example:
File Manager.
- You can access connected network drives with the right permissions, but you cannot disconnect them or set security on files in file manager.
It seems they aren't seen as network connections. To set security on network drives, you have to connect them yourself using a new drive
letter (or use UNC). Don't forget to disconnect the drive letter before you close the sunt-started program.
- There seem to be problems using 'Printers' in control panel. Simply use directly sunt prinman username instead.
Build hints
I only tried this program on intel-based machines since I don't have access to anything else.
However, I don't think there is any platform-specific code in it.
To build susrv and sunt, unpack each in it's own directory. MSVC make files are supplied. If you use MSVC 2.2,
just build using these makefiles and that's all. If you use MSVC 2.0 or 2.1, you need the header files and libraries
from the new Win32SDK. They are supplied with the Win 95 SDK CD, for instance. They must be searched before the ones
supplied with MSVC. To set this, use Tools->Options->Directories->Add and be sure the Win32 SDK directories are on top of the list
(In 'Include files' and 'Library files').
If you use another compiler, either get NT 3.51 compatible headers and libraries from your vendor or use the Win32 SDK header files
and run implib on advapi32.dll in your system32 directory. This should work.
Removal
If you want to remove the sunt service, simply run susrv -remove. After this, you can delete
the files belonging to susrv.
Mail me if you have questions or comments.
Steffen Krause
Steffen Krause
Wichertstr. 3
10439 Berlin
Germany
created 07-23-95, last changed 08-13-95