Skip to Content
Linux Security Cookbook
book

Linux Security Cookbook

by Daniel J. Barrett, Richard E. Silverman, Robert G. Byrnes
June 2003
Intermediate to advanced
336 pages
8h 54m
English
O'Reilly Media, Inc.
Content preview from Linux Security Cookbook

Trying the Recipes

Most recipes provide commands or scripts you can run, or a set of configuration options for a particular program. When trying a recipe, please keep in mind:

  • Our default shell for recipes is bash. If you use another shell, you might need different syntax for setting environment variables and other shell-specific things.

  • If you create a Linux shell script (say, “myscript”) in your current directory, but the current directory (“.”) is not in your search path, you can’t run it simply by typing the script name:

    $ myscript
    bash: myscript: command not found

    because the shell won’t find it. To invoke the script, specify that it’s in the current directory:

    $ ./myscript

    Alternatively, you could add the current directory to your search path, but we recommend against this. [Recipe 9.7]

  • Linux commands may behave differently when run in an interactive shell, a script, or a batch job (e.g., via cron). Each method may have a different environment (for example, search path), and some commands even are coded to behave differently depending how they are invoked. If a recipe does not behave as you expect in a script, try running it interactively, and vice versa. You can see your environment with the env command, and your shell variables with the set built-in command.

  • Different Linux distributions may place important binaries and configuration files in locations different from those in our recipes. Programs are assumed to be in your search path. You might need to add directories to your ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical Linux Security Cookbook - Second Edition

Practical Linux Security Cookbook - Second Edition

Tajinder Kalsi
Mastering Linux Command Line

Mastering Linux Command Line

Coding Gears | Train Your Brain

Publisher Resources

ISBN: 0596003919Errata Page