UserPreferences

SysAdminPeeves


1. System Administrator Peeves

Some might call them Best Practices, but I just call them good taste.

  1. Be sure brain is in gear before engaging fingers.

  2. Take the time to understand the problem you're facing.

  3. Take the time to fix something the Right Way instead of using duct tape.

  4. Use native facilities where possible.

  5. Follow the general principles of the [WWW]FHS, even on non-Linux systems. In that vein, there are a few sub-points:

    1. Don't clutter / with mount points, symlinks or other droppings.

    2. Try to keep /usr and /usr/local read-only.

    3. Usually, root's home directory can be moved from / to /root on systems where that isn't the default. Do it. (NB: I know it works on AIX; not sure about Solaris, HP-UX, etc.)

  6. Choose reasonable and sane names.

  7. Maintain as much consistency between hosts as possible.

    1. Look for similarity and exploit it. As an example that meets both this and the previous peeve, if you have four hosts that will all be running, say, Sybase, each with a separate volume group for the database, name the volume group something like sybasevg. Having them all the same, rather than sybprodvg, sybreportvg, etc. means that you can run the same command across all of the systems (and you will likely need to), but avoid too generic names like datavg or vg00.

    2. A tool like [WWW]cfengine can help.

  8. Don't muck with the base OS.

  9. Package 3rd party applications, especially F/OSS applications.

  10. Let your users choose their own usernames and e-mail addresses, within limits.

    1. Sometimes there are system limits to abide by, but usernames should always be lower-case and for the most part some combination of letters, digits and underscores.

    2. It's good to have a recommendation, because most won't care.

    3. A user will have to type is username several times a day. If he hates his username, he'll hate you and the organization with the stupid policy that forced it on him. If he likes it or doesn't care, you'll never enter his thoughts. Some users might not want their surname to be made known to people outside of the organization, because that more immediately identifies them and is easier to look up in a phone book than just a forename + initial. Sometimes the chosen algorithm yields an unacceptable name. My friend [WWW]Chris Chen was assigned the name chenc at Reed and he managed to convince the sys admin that it sounded too much like chink, which, being Chinese, he could find offensive. I got stuck with cooleyw (which I still get stuck with at some places).

  11. A partially-maintained convention may be worse than no convention at all.

    1. Reed was foisting these misbegotten usernames on us because they had the idea that then usernames and home directories would sort by surname. The problem was, most of the users did not have this format, so it was not only useless, it pissed people off. There were pretty much always going to be "legacy" users with the old format. The problem is that the expectation of consistency will lead to unexpected and embarassing errors.

  12. Follow conventions and best-practices for writing scripts, without good reason to do otherwise.

    1. Include a she-bang line on the first line. (Yes, I've seen people who didn't, until instructed otherwise.)

    2. Include a few comments at the top of the file indicating it's use, who wrote it, when you wrote it, etc. Here's a template I often use:

      #!/bin/bash
      #
      # foobar - Add foo to the bar.
      #
      # Written by Wil Cooley <wcooley@nakedape.cc>
      # Began 16 May 2006
      #
      # $Id$
      

    3. Damian Conway's Perl Best Practices is great for Perl; much of the advice (especially the coding conventions) applies to some degree across most scripting languages.

  13. Use some sort of revision control. Ideally, your whole network will be managed with a configuration tool from a central repository, but all-too-often the costs involved with such a migration are high or planned in the future--but even using RCS is an improvement (see also my RcsIntro).