August 25, 2009

Q: How can I configure and manage Windows user rights from the command line?

RSS
Subscribe to Windows IT Pro | See More Windows OSs Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

A: You can use the ntrights utility to grant or revoke Windows user rights, both logon rights and privileges, to users and groups on a local or remote computer. The ntrights utility is included in the Windows Server 2003 Resource Kit and the Windows 2000 Resource Kit. For example, to grant ServiceAccount1 on computer MyComputer the Logon as a service right, you must run the following command.

Ntrights +r SeServiceLogonRight -u ServiceAccount1 -m \\MyComputer

To revoke the Everyone group’s right to Access this computer from the network, run the command

Ntrights -r SeNetworkLogonRight -u Everyone

To display the user rights that have been assigned to the account you used to log on to a Windows system, use the whoami command line tool with the /priv switch:

Whoami /priv

Whoami is included in the Windows 2000 Resource Kit and is bundled with Server 2003, Windows Vista, and Windows Server 2008.

To display which users and groups have been assigned a particular user right, you can use the ShowPriv utility, which is included in the Server 2003 Resource Kit and the Windows 2000 Resource Kit. For example, to find which users and groups have been assigned the Log on locally logon on your system, run the command

Showpriv SeInteractiveLogonRight
Related Reading:

End of Article



Windows IT Pro Community
Blogs





Top Viewed ArticlesView all articles
WinInfo Short Takes: Week of November 23, 2009

An often irreverent look at some of the week's other news, including some post-PDC some soul searching, a Google Chrome OS announcement and a Microsoft response, Windows 7 off to a supposedly strong start, the Jonas Brothers and Xbox 360, and so much more ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...


Related Events Deep Dive into Windows Server 2008 R2 presented by John Savill

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


SQL Server Magazine Office & SharePoint Pro DevProConnections asp.netPRO ITTV
IT Library Technology Resource Directory Connected Home Windows SuperSite
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc.     Terms of Use | Privacy Statement | Reprints and Licensing