Библиотека сайта rus-linux.net
| The Linux System Administrator's Guide: Version 0.7 | ||
|---|---|---|
| Prev | Chapter 4. Overview of the Directory Tree | Next |
4.3. The /etc directory
The /etc directory contains a lot
of files. Some of them are described below. For others, you
should determine which program they belong to and read the manual
page for that program. Many networking configuration files are
in /etc as well, and are described in the
Networking Administrators' Guide.
/etc/rcor/etc/rc.dor/etc/rc?.dScripts or directories of scripts to run at startup or when changing the run level. See Chapter 9 for further information.
/etc/passwdThe user database, with fields giving the username, real name, home directory, encrypted password, and other information about each user. The format is documented in the passwd manual page. The encrypted passwords are much more commonly found in the
/etc/shadowthese days. This means that almost everything about the user except the password is stored in thepasswdfile. History and convention make a name change undesirable./etc/fdprmFloppy disk parameter table. Describes what different floppy disk formats look like. Used by setfdprm. See the setfdprm manual page for more information.
/etc/fstabLists the filesystems mounted automatically at startup by the mount -a command (in
/etc/rcor equivalent startup file). Under Linux, also contains information about swap areas used automatically by swapon -a. See Section 6.8.5 and the mount manual page for more information. Alsofstabusually has its own manual page in section 5./etc/groupSimilar to
/etc/passwd, but describes groups instead of users. See thegroupmanual page in section 5 for more information./etc/inittabConfiguration file for init.
/etc/issueOutput by getty before the login prompt. Usually contains a short description or welcoming message to the system. The contents are up to the system administrator.
/etc/magicThe configuration file for file. Contains the descriptions of various file formats based on which file guesses the type of the file. See the
magicand file manual pages for more information./etc/motdThe message of the day, automatically output after a successful login. Contents are up to the system administrator. Often used for getting information to every user, such as warnings about planned downtimes.
/etc/mtabList of currently mounted filesystems. Initially set up by the bootup scripts, and updated automatically by the mount command. Used when a list of mounted filesystems is needed, e.g., by the df command.
/etc/shadowShadow password file on systems with shadow password software installed. Shadow passwords move the encrypted password from
/etc/passwdinto/etc/shadow; the latter is not readable by anyone except root. This makes it harder to crack passwords. If your distribution gives you a choice (many do) of whether or not to use shadow passwords then you are highly recommended to do so./etc/login.defsConfiguration file for the login command. The
login.defsfile usually has a manual page in section 5./etc/printcapLike
/etc/termcap, but intended for printers. However it uses different syntax. Theprintcaphas a manual page in section 5./etc/profile,/etc/csh.login,/etc/csh.cshrcFiles executed at login or startup time by the Bourne or C shells. These allow the system administrator to set global defaults for all users. See the manual pages for the respective shells.
/etc/securettyIdentifies secure terminals, i.e., the terminals from which root is allowed to log in. Typically only the virtual consoles are listed, so that it becomes impossible (or at least harder) to gain superuser privileges by breaking into a system over a modem or a network. Do not allow root logins over a network. Prefer to log in as an unprivileged user and use su or sudo to gain root privileges.
/etc/shellsLists trusted shells. The chsh command allows users to change their login shell only to shells listed in this file. ftpd, the server process that provides FTP services for a machine, will check that the user's shell is listed in
/etc/shellsand will not let people log in unless the shell is listed there./etc/termcapThe terminal capability database. Describes by what ``escape sequences'' various terminals can be controlled. Programs are written so that instead of directly outputting an escape sequence that only works on a particular brand of terminal, they look up the correct sequence to do whatever it is they want to do in
/etc/termcap. As a result most programs work with most kinds of terminals. See thetermcap, curs_termcap, andterminfomanual pages for more information.
