NT Administration from the Command Line

In addition to using the GUI to create accounts and groups, the command line can be used. This is often useful when automating server setup or recovery. net user jsmith tempword /ADD /FULLNAME:”John Smith” /COMMENT:”Accounting Manager” net localgroup “Accounting Local Resource Group” /add /COMMENT:”Payroll and A/R Files” net group “Accounting Members” /ADD /COMMENT:”Members have access […]

Don’t Wrap in the Middle of a Word, and Display Partial Paragraphs in Vim

A couple things that really annoy me are the default vim settings where words get chopped in the middle and paragraphs don’t display correctly. I’m sure there is a reason for the defaults, but here is how you change this while in vim: :set linebreak :set display+=lastline If you put this in .vimrc in your […]

Slipstreaming SP2 into Microsoft Windows Server 2003 Install Files

Slipstreaming is the application of service pack files into the original install files from the distribution media so that you can point to one location when adding components to Windows Server 2003. The command with Service Pack 2, and probably others is: sp2 /integrate:c:\win2003std\ sp2 is the name of the service pack .exe, and win2003std […]

Services Subkey Entries

Beware! Make sure you have a backup of the registry and are 100% confident of the syntax of the entries before you change anything. If you mess up, your NT system may never boot again, and you will have to reinstall NT. Try to tweak the registry indirectly whenever you can through control panel/services, system […]

Using Strace to Determine What Files a Program Opens

We were recently configuring AIDE, and didn’t pay attention to the defaults in the configuration when we compiled it, and didn’t know where aide.db.new was going to after running aide initially. Sure, lsof would work while to porgram is running; however, we needed to know what files were open while the program was running. Strace […]

In Case of Emergency… Yodel

Your servers are all monitored with Nagios. Splunk is constantly eating your logs. You’ve got your EPO switch, your UPS, your temperature sensors and surveillance camera. The cables are tied up as neat as a Mouseketeer’s pigtails, remote management interfaces are quietly waiting for a server crash to require a remote reboot. This installation is […]

Using the CACLS command

The cacls command is used to edit and display file permissions on NTFS partitions. Here is a list of the options: D:\>cacls Displays or modifies access control lists (ACLs) of files CACLS filename [/T] [/E] [/C] [/G user:perm] [/R user […]] [/P user:perm […]] [/D user […]] filename Displays ACLs. /T Changes ACLs of specified […]

Changing the Default Crontab Editor

The default crontab editor is nano on some systems. This is a pain. You can change this by setting the EDITOR environment variable. In BASH: srv-4 / # set | grep EDITOR EDITOR=/bin/nano srv-4 / # which vi /usr/bin/vi srv-4 / # export EDITOR=/usr/bin/vi srv-4 / # set | grep EDITOR EDITOR=/usr/bin/vi _=EDITOR srv-4 / […]

Imagine, Express, Observe, Improve, Converge

I encourage every systems administrator, engineer, or architect to watch this. The birth of new systems is presented in three stages: bootstrapping, configuration, and command and control. These stages are analyzed with traditional procedures vs. the vision of Adam and Ezra of a better way. Bootstrapping is facilitated by cloud computing; configuration focuses on expressions […]

Our Favorite NT Registry Entries

Beware! Make sure you have a backup of the registry and are 100% confident of the syntax of the entries before you change anything. If you mess up, your NT system may never boot again, and you will have to reinstall NT. Try to tweak the registry indirectly whenever you can through control panel/services, system […]