
Grant Admin Rights to an Application?
Take a look at the SU.EXE utility. I'm not sure where it is under NT. It
doesn't install by default. Mayne it's on the CD. SU.EXE is a program that
can take command line arguements to temporarily change the current user to
the Administrator. SU will create a DOS window and any application from
that window has Administrative rights.
Be aware that this utility replaces the HKEY_CURRENT_USER tree in the
registry to the Administrator's Tree so the User's settings are not
availiable from here. You have to dig through HKEY_USERS.
Here is a screen list of the options:
C:\>su -?
SU for Windows NT v2.00 Aug 30 1996 22:46:13
Usage: su <User> "[cmdline]" [domain] [[Winsta\]Desktop] [options]
-cb do not create new console (do not use with redirected passwords)
-e disables environment preparation (Inherit parent environment)
-g force GUI option prompting with supplied commandline arguments
-l disables loading of the user registry hive (use .Default)
-v verbose output to stdout
-w do not wait on child (registry hive will remain loaded)
One of the following logon types may be specified. Default is interactive.
-b batch, target user needs SeBatchLogonRight
-i interactive, target user needs SeInteractiveLogonRight
-s service, target user needs SeServiceLogonRight
-n network, target user needs SeNetworkLogonRight (WinNT 4.0 only)
Not specifying a cmdline invokes the default command processor (%comspec%)
Not specifying a domain causes account lookup in the following order:
Well-known, built-in, local accounts, primary domain, trusted domains
Specifying . as the domain limits the LogonUser search to the local machine
Not specifying Winsta\Desktop launches child on current Winsta\Desktop
Winsta0\Default is the user default interactive Windowstation and desktop
Hope this helps,
Mike Reck
Quote:
> Our manufacturing line has locked down NT workstations for the users but
> certain tasks such as setting the time needs administrator rights.
> Does anyone know how I can shell a program and grant my admin rights?
What
> I would like to do is write a little program, pass in the admin account
name
> and password then launch an exe with those rights.
> Can it be done? Any source code laying around?
> Many thanks, Rick