Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Absolute BSD - The Ultimate Guide To FreeBSD (2002).pdf
Скачиваний:
29
Добавлен:
17.08.2013
Размер:
8.15 Mб
Скачать

linux_enable="NO" This option enables or disables the kernel's Linux compatibility module. See Chapter 11.

svr4_enable="NO" FreeBSD has a compatibility module for UNIX System V, and this option enables or disables that module. See Chapter 11 for details.

osf1_enable="NO" DEC Digital UNIX only runs on the Alpha. Since FreeBSD runs on the Alpha, a compatibility module exists, and this option enables or disables it. This option is useless on X86 hardware. We won't discuss the option except in the abstract, but it's nice to know that the option exists.

clear_tmp_enable="NO" Older UNIX systems erase the contents of /tmp at boot. FreeBSD doesn't do this by default, but you can enable this behavior here.

ldconfig_paths="/usr/lib/compat /usr/X11R6/lib /usr/local/lib" This option lists the directories where shared libraries are stored. For most installations the default setting is adequate. If you find yourself setting LD_LIBRARY_PATH for all your users, however, you should look at adjusting this option instead. See Chapter 11 for more hints.

kern_securelevel_enable="NO" Set this option to "YES" to enable the FreeBSD kernel's security features at boot. See Chapter 7.

kern_securelevel="−1" If you've enabled kernel security, you can choose your securelevel with this option. See Chapter 7.

start_vinum="NO" Set this option to "YES" if you're using the Vinum software RAID machine. See Chapter 17.

rc.shutdown

When you issue a shutdown or reboot command, the system runs rc.shutdown. This script searches through your local startup directories as specified in /etc/rc.conf, running each shell script it finds with a "stop" argument.

If you need the system to take a particular action upon shutdown, you can add the appropriate shell commands to the end of /etc/rc.shutdown. Most packaged software automatically includes the appropriate shutdown commands in its /usr/local/etc/rc.d script, so you shouldn't have to do this. You might have custom shutdown commands, however, which would be appropriate to add here. If at all possible, however, just create a script in a startup directory.

/etc/resolv.conf

The /etc/resolv.conf file configures how the system DNS resolver works. See Chapter 12.

/etc/security

The /etc/security file is a straightforward shell script run each day by periodic(8), and you can edit it as you like. It performs a variety of simple system−integrity checks, such as checking for changes to /etc/master.passwd, mounted filesystems, and kernel log messages, and its output is mailed to root every day. To disable it entirely, you can do so in /etc/periodic.conf with this setting:

...............................................................................................

221

daily_status_security_enable="NO"

...............................................................................................

Generally, the security output is worth having because it can point out a variety of system problems as well as security issues.

/etc/services

This file lists many commonly used network ports. See Chapter 5.

/etc/shells

/etc/shells contains a list of all legitimate user shells. Installing a shell via a port or a package adds an appropriate entry in /etc/shells, but if you compile your own shell from source, without using a port, you'll need to edit this file. Shells are listed by their complete path name.

The FTP daemon will not allow a user to log in if his shell is not listed in /etc/shells. If you're using /sbin/nologin as an FTP−only user shell, you need to add it to this file, though a better way to handle this is with login classes (see /etc/login.conf).

/etc/spwd.db

This file resembles /etc/pwd.db, but is based on /etc/master.passwd. It contains all user account information in a database form, so other programs can quickly access it. Since it contains confidential information, only root can read it. See /etc/pwd.db and /etc/master.passwd for details.

/etc/ssh

This file controls how your system's SSH server and client behave. See Chapter 13 for details.

/etc/sysctl.conf

This file contains information on which kernel sysctls are set during the boot process. See Chapter 4.

/etc/syslog.conf

This file controls which data your system logs. See Chapter 19.

[1]Remember Chapter 8? This is a default accept security stance.

222