Windows 7 equivalent for ntrights.exe

23

3

What is an equivalent for ntrights.exe on Windows 7?

I need it to be able to be run from the command line.

Avery3R

Posted 2011-07-11T20:20:09.650

Reputation: 684

Answers

19

You can still use ntrights from the Windows Server 2003 Resource Kit Tools. Although not supported naturally, many of the tools performs flawlessly (including ntrights.exe).

Proof: Microsoft TechNet (scroll down until you find the Tool table, including NTRights.exe as one of the tools that can be used).

A Dwarf

Posted 2011-07-11T20:20:09.650

Reputation: 17 756

12

If you want to do it in Powershell you can install Powershell Community Extensions (PSCX) and use their Get-Privilege and Set-Privilege cmdlets.

Example from PSCX Help:

$p = Get-Privilege
$p.Enable('SeTimeZonePrivilege')
Set-Privilege $p
Get-Privilege | ft Name, Status -a

Name Status
---- ------
SeShutdownPrivilege Disabled
SeChangeNotifyPrivilege EnabledByDefault, Enabled
SeUndockPrivilege Disabled
SeIncreaseWorkingSetPrivilege Disabled
SeTimeZonePrivilege Enabled

By default it acts on the current user, but you can pass it a specific windows identity, of course.

oleschri

Posted 2011-07-11T20:20:09.650

Reputation: 1 075

How can I get the identity to pass it, if I want to set a privilege for a different user? – Peter Mounce – 2013-08-07T12:03:37.817

@PeterMounce Both cmdlets have an -Identity parameter, so you should be a able to specify another user. But I haven't tried that myself. – oleschri – 2013-08-08T09:44:05.260

I did try that, and it didn't accept a string containing the username as a valid identity; I assume therefore it wants an object. – Peter Mounce – 2013-08-08T15:51:03.120

@PeterMounce It seems to expect a System.Security.Principal.WindowsIdentity. Couldn't get it to run with another user either. – oleschri – 2013-08-09T08:59:54.807

yes; how do I get hold of one of those? – Peter Mounce – 2013-08-09T10:03:08.400

@PeterMounce I could only get a WindowsIdentity for my currently loggend on user. You could post this as a new Powershell question on SuperUser or ServerFault. – oleschri – 2013-08-12T13:58:52.690

3

Although its not suitable for scripting, The user management plugin for the orthodox file manager Far Manager will let you do this from the console. If you are running the 64 bit version of farmanager, you will need the 64 bit version of the plugin from the evil programmers google code project.

Justin Dearing

Posted 2011-07-11T20:20:09.650

Reputation: 2 704