Introducing the ETC directory of Linux system and its passwd files

Source: Internet
Author: User
Tags readable require

Let's take a look at what is generally included in the ETC directory:

/ETC Directory

Contains a lot of files. Many network profiles are also in/etc.

/ETC/RC OR/ETC/RC.D OR/ETC/RC*.D

A directory of scripts or scripts that runs when the run level is started, or changed.

/etc/passwd

User database, where the domain gives the username, real name, home directory, encrypted password, and other information about the user.

/etc/fdprm

Floppy disk parameter table. Describes the different floppy disk formats. Set with SETFDPRM.

/etc/fstab

A list of file systems that are automatically mount at startup mount-a command (in/ETC/RC or equivalent startup files). Linux also includes information about swap areas that are enabled with SWAPON-A.

/etc/group

Similar to/etc/passwd, but not the user but the group.

/etc/inittab

The configuration file for init.

/etc/issue

Getty the output information before the logon prompt. Usually includes a short description of the system or a welcome message. The content is determined by the system administrator.

/etc/magic

The configuration file for file. Contains a description of the different file formats based on which file types are guessed.

/etc/motd

Message of Theday, automatically output after successful login. The content is determined by the system administrator. Often used for notification information, such as a warning to schedule shutdown time.

/etc/mtab

The list of currently installed file systems. Initialized by scripts and automatically updated by the Mount command. Use, such as the DF command, to require a list of currently installed file systems.

/etc/shadow

Shadow password file on a system with shadow password software installed. The shadow password file moves the encrypted password in the/etc/passwd file to/etc/shadow, which is only readable for root. This makes deciphering the password more difficult.

/etc/login.defs

The configuration file for the login command.

/etc/printcap

Similar to/etc/termcap, but for printers. syntax is different.

/etc/profile,/etc/csh.login,/ETC/CSH.CSHRC

A file executed Bourne or cshells at logon or startup. This allows the system administrator to establish a global default environment for all users.

/etc/securetty

Confirm the security terminal, which terminal allows root to log in. Typically only a virtual console is listed, which makes it impossible (at least difficult) to break into the system through a modem or network and gain superuser privileges.

/etc/shells

Lists the trusted SHELL.CHSH commands that allow the user to change the login shell within the specified scope of this file. Provides a service process for a machine FTP service FTPD checks whether the user shell is listed in the/etc/shells file, and if not, the user is not allowed to log on.

/etc/termcap

Terminal Performance database. Describes what "escape sequences" are used by different terminals. When writing a program, you do not output the escape sequence directly (this can only work on a specific brand terminal), but instead find the correct sequence of work to do from the/etc/termcap. In this way, most programs can run on most terminals

In this section, we mainly introduce a user profile in the/etc directory:/etc/passwd.

/etc/passwd a row of records corresponds to one user, each row is separated by a colon (delimited by 7 fields, with the following format and specific meanings:

Username: Password: User identification number: Group ID: Annotation Description: Home directory: Login Shell

1 "username" is a string representing the user account. Typically no longer than 8 characters long and are made up of uppercase and lowercase letters and/or numbers (Linux systems are generally sensitive to case sensitivity). You cannot have a colon in the login name, because the colon is a separator here. For compatibility purposes, it is best not to include the dot character (.) in the login name and start with a hyphen (-) and a plus sign (+).

2 "password" in some systems, the encrypted user password is stored. This is a security risk because the/etc/passwd file is readable by all users, although the field stores only the encrypted string of user passwords, not plaintext. As a result, many Linux systems (such as SVR4) now use the shadow technology to store the true encrypted user password in a/etc/shadow file, and only one special character, such as "X" or "*", is stored in the password field of the/etc/passwd file.

3 "User ID" is an integer that is used internally by the system to identify the user. In general, it corresponds to a username of one by one. If several user names correspond to the same user ID, they will be treated as the same user within the system, but they can have different passwords, different home directories, and different login shells.

Typically, the user identification number is 0~65 535. 0 is the identification number of Superuser root, 1~99 is reserved by the system, and as an administrative account, the average user's identification number begins at 100. In a Linux system, the limit is 500.

4 The Group Identification Number field records the user group to which the user belongs. It corresponds to a record in the/etc/group file.

5 "Annotated description" field records some of the user's personal situation, such as the user's real name, telephone, address, etc., this field does not have any practical uses. In different Linux systems, the format of this field is not uniform. In many Linux systems, this field holds an arbitrary annotated descriptive text that is used as the output of the finger command.

6 "Home Directory" is the user's starting working directory, which is the user's directory after logging into the system. In most systems, the user's home directory is organized under the same specific directory, and the user's home directory name is the user's login name. Each user has read, write, execute (search) permissions on his or her home directory, and other users ' access to the directory is set according to the specific circumstances.

7 User login, to start a process, responsible for the user's operation to the kernel, this process is the user log into the system after the operation of the command interpreter or a specific program, that is, Shell. The Shell is the interface between the user and the Linux system. There are many kinds of Linux shells, each of which has different characteristics. Commonly used are sh (Bourne shell), csh (c shell), Ksh (Korn Shell), tcsh (tenex/tops-20 type C shell), bash (Bourne Again shell), and so on. System administrators can specify a shell for the user based on system conditions and user habits. If you do not specify a shell, then the system uses SH as the default login shell, that is, the value of this field is/bin/sh.

The user's login shell can also be specified as a specific program (this program is not a command interpreter). With this feature, we can limit the user to running only the specified application, and the user will automatically exit the system after the application has finished running. Some Linux systems require only those programs that are registered in the system to appear in this field.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.