SYNOPSIS
priv
[
priv
priv
DESCRIPTION
The priv utility has three syntaxes, each of which manipulates the rights/privileges list for a list of users, a command, or a list of process IDs.
When you invoke priv with neither the
- Note:
-
user can be either a user name or a group name.
With the
The -p option is similar to the -e option except that all adjustments are made to the specified list of process IDs (pid ...).
All three syntaxes have options that allow you to specify a
rights_list with the
-a SeAssignPrimaryTokenPrivilege,SeBatchLogonRight -a "SeAssignPrimaryTokenPrivilege SeBatchLogonRight"
When neither the
The priv utility does not manipulate the privileges or rights directly; it passes them to the operating system. As a result, priv is not limited to a built-in set of rights of privileges, and thus, independent of the revision level of 8.1/2012R2/10/2016/2019/11/2022. However, the case sensitivity of privilege and right names is dependent upon the operating system. Some privileges appear to be case insensitive while some rights appear to be case sensitive. This case sensitivity may vary based on the revision of the 8.1/2012R2/10/2016/2019/11/2022 operating system.
Options
-a rights_list-
adds (or enables, for
-e and-p ) the rights/privileges specified by rights_list. -D domain-name-
specifies the domain where the security database resides for the users whose rights/privileges are to be manipulated. priv normally performs actions on the local system.
The
-D and-S options are mutually exclusive. -d rights_list-
removes (or disables, for
-e and-p ) the rights/privileges specified by rights_list. -e -
manipulates the process tokens for a specified command rather than the rights/privileges lists of users.
-p -
manipulates the process tokens for a specified list of process IDs (pid ...) rather than the rights/privileges lists of users.
-S hostname-
specifies the host machine where the security database resides for the users whose rights/privileges are to be manipulated. priv normally performs actions on the local system. Optionally, hostname may be preceded by \\ or //.
The
-D and-S options are mutually exclusive. -v -
displays more information about rights/privileges lists or process tokens. With neither
-e nor-p , this option displays the verbose english description of the privilege rather than just its name.With
-e or-p , when priv displays the rights list for a given token, it displays both the privilege name and the privilege display name.
Examples
The following command runs the standard task manager with the debug privilege enabled:
priv -e -a SeDebugPrivilege taskmgr&
Normally, in taskmgr, if you try to kill a process owned by somebody else, you get an Access Denied message. The debug privilege allows you to bypass that requirement, and by enabling before invoking taskmgr, the task manager can kill many more processes. Alternatively,
priv -e -a SeDebugPrivilege taskmgr& priv -e -d SeDebugPrivilege
enables the debug privilege, runs the task manager (which would have the debug privilege enabled), and finally, disables the debug privilege.
DIAGNOSTICS
Possible exit status values are:
NOTES
One confusing thing about 8.1/2012R2/10/2016/2019/11/2022 is that many system calls and programs silently enable privileges if they can be enabled. For example, the PTC MKS Toolkit kill command automatically enables the sedebugprivilege privilege if you have it.
PORTABILITY
Windows 8.1. Windows Server 2012 R2. Windows 10. Windows Server 2016. Windows Server 2019. Windows 11. Windows Server 2022.
AVAILABILITY
PTC MKS Toolkit for System Administrators
PTC MKS Toolkit for Developers
PTC MKS Toolkit for Interoperability
PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition
PTC MKS Toolkit 10.4 Documentation Build 39.