P
Paul Baker [MVP, Windows - Networking]
These observations were made mostly through testing and partly through
examination of Windows XP source code through the Source Licensing Program.
Please correct me if I am mistaken.
** On Windows XP **
The Add Printer Wizard allows only a user with SERVER_ACCESS_ADMINISTER
access to add a local printer. This is hardcoded as Administrators, Power
Users and domain Print Operators.
The Add Printer Wizard uses the "SeLoadDriverPrivilege" privilege (which
corresponds to the "Load and unload device drivers" user right) to decide
whether or not a user can add a printer driver. The default is
Administrators.
A summary of the permissions on the
HKLM\system\CurrentControlSet\control\print\printers key is:
Users=Read
Power Users=Special
Administrators=Full Control
SYSTEM=Full Control
CREATOR OWNER=Full Control
The Server Properties dialog allows only a user with
SERVER_ACCESS_ADMINISTER access to add or remove a driver, without regard to
the "SeLoadDebugPrivilege" privilege.
** On Windows Vista **
The Add Printer Wizard appears to allow any user to add a local printer and
to add a driver.
A summary of the permissions on the
HKLM\system\CurrentControlSet\control\print\printers key is:
Users=Read
Administrators=Full Control
MACHINE\SYSTEM=Full Control
CREATOR OWNER=Special
I am not sure how it determines whether a user can add or remove a driver
using the Server Properties dialog, but my guess is that they must be an
administrator in elevated mode.
I used Windows Vista Business for my tests.
** Questions **
These are some of the things seem odd to me:
1. On Windows XP, only privileged users can uses the Add Printer Wizard to
add a local printer or driver whereas in Windows Vista, any user can add a
local printer and driver using the Add Printer Wizard and there is no
elevation prompt of any kind! Is this indeed the case? Is that not a
*decrease* in security?
2. The Server Properties dialog would appear to allow anyone with
SERVER_ACCESS_ADMINISTER access to add and remove drivers without regard to
the "SeLoadDebugPrivilege" privilege. The inconsistency of this when
compared to the Add Printer Wizard is more evident on Windows Vista, because
anyone can add a driver using the Add Printer Wizard, but not so in the
Server Properties dialog.
3. On Windows Vista, a standard user does not have permissions to add the
necessary registry entries to add a local printer, but the Add Printer
Wizard adds one anyway under the MACHINE\SYSTEM account (I know this because
that account is the owner). Is the Add Printer Wizard running under a
privileged account with no elevation prompt?
Perhaps this is just a case where ease of use won out over security and
consistency
The reason I ask is that I wrote software that can add a local printer with
special configuration through the AddPrinter API that reverts to a browse
dialog for network printers if the user does not have
SERVER_ACCESS_ADMINISTER access. This seems to be incorrect on Windows
Vista.
Paul
examination of Windows XP source code through the Source Licensing Program.
Please correct me if I am mistaken.
** On Windows XP **
The Add Printer Wizard allows only a user with SERVER_ACCESS_ADMINISTER
access to add a local printer. This is hardcoded as Administrators, Power
Users and domain Print Operators.
The Add Printer Wizard uses the "SeLoadDriverPrivilege" privilege (which
corresponds to the "Load and unload device drivers" user right) to decide
whether or not a user can add a printer driver. The default is
Administrators.
A summary of the permissions on the
HKLM\system\CurrentControlSet\control\print\printers key is:
Users=Read
Power Users=Special
Administrators=Full Control
SYSTEM=Full Control
CREATOR OWNER=Full Control
The Server Properties dialog allows only a user with
SERVER_ACCESS_ADMINISTER access to add or remove a driver, without regard to
the "SeLoadDebugPrivilege" privilege.
** On Windows Vista **
The Add Printer Wizard appears to allow any user to add a local printer and
to add a driver.
A summary of the permissions on the
HKLM\system\CurrentControlSet\control\print\printers key is:
Users=Read
Administrators=Full Control
MACHINE\SYSTEM=Full Control
CREATOR OWNER=Special
I am not sure how it determines whether a user can add or remove a driver
using the Server Properties dialog, but my guess is that they must be an
administrator in elevated mode.
I used Windows Vista Business for my tests.
** Questions **
These are some of the things seem odd to me:
1. On Windows XP, only privileged users can uses the Add Printer Wizard to
add a local printer or driver whereas in Windows Vista, any user can add a
local printer and driver using the Add Printer Wizard and there is no
elevation prompt of any kind! Is this indeed the case? Is that not a
*decrease* in security?
2. The Server Properties dialog would appear to allow anyone with
SERVER_ACCESS_ADMINISTER access to add and remove drivers without regard to
the "SeLoadDebugPrivilege" privilege. The inconsistency of this when
compared to the Add Printer Wizard is more evident on Windows Vista, because
anyone can add a driver using the Add Printer Wizard, but not so in the
Server Properties dialog.
3. On Windows Vista, a standard user does not have permissions to add the
necessary registry entries to add a local printer, but the Add Printer
Wizard adds one anyway under the MACHINE\SYSTEM account (I know this because
that account is the owner). Is the Add Printer Wizard running under a
privileged account with no elevation prompt?
Perhaps this is just a case where ease of use won out over security and
consistency
The reason I ask is that I wrote software that can add a local printer with
special configuration through the AddPrinter API that reverts to a browse
dialog for network printers if the user does not have
SERVER_ACCESS_ADMINISTER access. This seems to be incorrect on Windows
Vista.
Paul