Shell Script Security
Thus far, we haven’t talked a whole lot about shell scripting security. Frankly, it’s because it’s one of those things that you might never have to worry about. I mean, a lot of times you’ll just be writing scripts for your own use, that you’ll just be running from your home directory on your own local machine. Even if you’re an administrator who needs to create scripts that perform some sort of administrative task, you might only need to either run them on from your own home directory or share them with other trusted administrators who just run them from their own home directories. In these cases, shell scripting security isn’t necessarily a huge deal.
However, you may at times need to share your script with other users or administrators that you don’t fully trust. In these cases, shell scripting security is extremely important, and should be a major part of your scripting focus. For example, you might...