Best Practice Ezine #17 – Cacls

Best Practice Ezine.  Computer Performance. Advertise

Guy’s Best Practice & Litmus Tests Ezine #17 – NetSH, CACLS

Two classic command line tools.  One day you may need to use these utilities in a script.

Contents for Ezine #17

Cacls

Cacls is the classic utility for altering permissions on files and folders. Generally I prefer to use Explorer, but when you need to script repetitive tasks, then Cacls comes into its own.

If you wish to accept my Cacls challenge then this what you should do.

0) Get Cacls –  download CACLS.
1) Create a C:\Guy folder (Change guy to yourname if I were you)
2) Copy files, any files will do, into this C:\Guy folder. Also copy cacls.exe from the link
3) Run, CMD. Once you have your ‘DOS box’ then type -cacls
4) Have a look through the commands for ideas.
5) The famous wildcard *.* works well for the file names.
6) Challenge: set the permissions to read only. Type this: cacls *.* /G everyone:r
7) If you get a prompt y/n then just type y.

Guy Recommends: The Free IP Address Tracker (IPAT) IP Tracker

Calculating IP Address ranges is a black art, which many network managers solve by creating custom Excel spreadsheets.  IPAT cracks this problem of allocating IP addresses in networks in two ways:

For Mr Organized there is a nifty subnet calculator, you enter the network address and the subnet mask, then IPAT works out the usable addresses and their ranges. 

For Mr Lazy IPAT discovers and then displays the IP addresses of existing computers. Download the Free IP Address Tracker

NetSH

NetSH is the classic network shell program. As with Cacls, I prefer alternative techniques, such as: Remote Desktop, Terminal server, even Telnet. However, the NetSH does have a place in your tool kit

If you accept my challenge then either get NetSH from the resource kit, or from this link to my site.
Install into the %systemroot%system32\ folder.

Challenge A
1) Run Cmd, then in the ‘DOS’ box type netsh.
2) What you should see is netsh>
3) Make liberal use of Show, Set, and Help
4) Type: interface. What you should see is: netsh interface>
5) Next type: ip. What you should see is netsh interface ip>
6) Now try SHOW.   I hope this will give you ideas for configuring TCP/IP

Challenge B
1) One of the best uses of NetSH is to configure a remote machine.
2) Assume that you have a machine called REMOTE on your network.
3) Type this: netsh set machine REMOTE. What you should see is: [remote] netsh>
4) Now repeat Challenge A (above)
5) Well I you have added NetSH to your tool kit.

Download NetSH and CACLS.


See more interesting free computer utilities

Here are my reviews of more useful computer tools.  Most of these programs are free, while others are major applications, but time-limited.  One common theme is that Solarwinds give you a free specialist utility, and then supply a more comprehensive suite for larger organizations.  To let you into a secret; for small networks the free tool is all you’ll ever need.

E 202 Permissions Monitor  • E 190 Network Device Monitor   • E 181 Config Generator

E 166 IPAM  •E 161 OB IT  •E 159 Kiwi Syslog Review  • E 156 Windows Network Monitor

Real Time Netflow Analyzer  •Syslog Utility  • Ezines Home  • Ezines Home