Saturday, October 10, 2009

Automating UNIX and Linux Administration

Automating UNIX and Linux Administration
by Kirk Bauer   ISBN:1590592123
Apress © 2003

Admit it. You are reading this book because you are lazy. Lazy system administrators are wonderful people—who else is willing to spend so much time now in order to do nothing later? We all dream of waking up in the morning, grabbing the laptop from the bedside table, checking our email, and then heading off to the lake for the day.

Using the techniques in this book, you can get closer to the ideal world of fully automated system administration. Although unexpected things always go wrong, we can at least delegate all of the mundane and repetitive tasks to the computer (whose purpose, of course, was to make our lives easier). I will leave it up to you to convince your boss that you only need to come in to work one day per week.

Benefits of Automation

In most cases, the motivation behind automation is saving time. We are busy people and our time is valuable. We would rather write a script to add a user than add one manually a few times a day. We can then take that time we save and spend it doing things that aren't as easy to automate (or things that are much more entertaining). There are other benefits of automation, however, that are not quite as apparent.

In many cases, automation allows others to do things that they don't have enough direct knowledge to do themselves. These other people range from inexperienced system administrators working under you to support staff manning the corporate help desk. Your automation makes everybody's lives much easier. They don't have to bother you so much, and you don't have to answer the same questions every day.

Equally important is the unintentional documentation that can result from automation. For example, to add a new account, you have to add it to the passwd, shadow, and group files, as well as create a home directory on the file server and set up the automount tables. Although you normally thoroughly document and follow step-by-step procedures for most of your administration tasks, you somehow manage to neglect this particular task.

This is where automation is very helpful. If you write a script to do all of the tasks required to create a user, you have effectively written a step-by-step guide explaining how to create a new account. If you put some good comments in the script, you have documented the process as well. The script comes in handy when you haven't added a new account for three months. Even if the script is dated and fails to operate correctly, you still know what was supposed to happen and that it was supposed to work. Instead of having to re-create the process from scratch, you can just tweak the script so that it will work this time and the next.

Download the free chm ebook: Automating UNIX and Linux Administration


Tags: unix, linux