Q

How do I set audit permissions to a folder by command prompt in NT 4.0?

How do I set audit permissions to a folder by command prompt in Windows NT 4.0? The objective is to apply automated audit settings to a specific folder using batch files.
The Windows NT 4.0 Resource Kit provides a CACLs utility which can be used to set file permissions, but does not provide one for setting audit parameters or system access control lists (SACLs).

The easy answer here is to purchase a tool. A set of command line tools (including "audit," which does what you...

want) are available from Pedestal Software. I have not used these tools, so can not vouch for how well they will work in your circumstances.

The long answer to your questions is that you may need to do a little more than use a batch file -- you may need to develop your own utility. The following Microsoft documents discuss programmatically setting SACLs (audit settings) for files and folders. For Windows NT, Auditing, or the other side of security provides C++ code examples.

Some documentation on the "SetFileSecurity" method (works in Windows NT and above) is available here.

Should you be thinking of moving to Windows 2000, see ADSI article Setting access rights on an object. If you're looking to move to XP or Windows Server 2003, look for information on the IADsSecurityUtility interface for XP.

This was last published in March 2003

Dig Deeper on Windows legacy operating systems

PRO+

Content

Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchVirtualDesktop

SearchWindowsServer

SearchExchange

Close