Short security checklist:
Unix system security is largely the responsibility of the system administrators. In managing our systems, we choose a middle ground between having so little security that any user can harm the system and having so much security that academic curiosity and the free interchange of knowledge is stifled. There is essentially a default level of security that you can accept, increase, or decrease according to your needs.
The default level of security is sufficient to protect your work from careless mistakes and naive attempts at tampering. However, for your own work to be reasonably secure, you must understand something about the Unix access mechanisms and what your responsibilities are in maintaining security.
This document is not intended to be a security tutorial. All the commands and methods discussed are standard parts of Sun Solaris unless otherwise indicated. For additional information, please see the manual pages and other Unix documentation.
The examples and command syntax shown are for the Solaris (System V) flavor Unix. The few SunOS (BSD derived) systems we still operate are somewhat different. The HP-UX systems in the Case Center also use the System V flavor of Unix and have similar commands and capabilities, but the syntax may differ slightly. The various versions of Unix are slowly converging on a standard set of commands.
A good password is composed of two or more small nonsense words and two or more non-alphabetic symbols or uppercase letters. For example: dog$waLL, 8bar3goo, I2pIne4u. Such passwords are easy to remember, yet are very difficult for people (or programs) to guess. You may enter a password of any length, but only the first eight characters are used.
A complete discussion of controlling access to your files and directories is covered in the Linux File Access Permissions documents.
+@cse lees ozma.emerald.city.oz lees
Outside of vi you can use the crypt command to encrypt or decrypt a file. First use gzip to compress the file, then use crypt. See the man pages for more information.
Of course you must decrypt a file to use it. This makes the file at least temporarily vulnerable. You can shorten this vulnerability by using crypt in a pipe:
gzip [file] | crypt [key] | lpr -Psomeprinter
WARNING: If you encrypt a file and forget the encryption key, you are out of luck. There is no way we can help you recover your file!
set noclobber alias cp 'cp -i' alias mv 'mv -i' alias rm 'rm -i'
The -i option causes the command to ask for confirmation before a file is written over or removed. The noclobber switch prevents you from redirecting output to an existing file unless you permit it by using >! syntax. If you use other than the C shell, please set up your dot files to provide similar protection.
For the same reason you should not have "." (the current directory in your path). Consider what happens if a nasty person plants executable files in /tmp having names like "ls" and "cd". Even if "." is last in your path, you can be caught by trojan horses having names like "sl", "csl", and so on.
Another favorite trick is to write a program that makes the monitor look like the standard login screen. When you try to login the program captures your username and password and then dies, making it look like you typed your password incorrectly. In practice this is very difficult to do in such a way that the bogus login screen looks and feels completely correct.
The message here is pay attention and do not take for granted the security of your computing environment.