Article Title: galloping in the Linux World-Linux System Management 3. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
In practice, the password field is completely unnecessary. In fact, many systems do not provide tools to set group passwords. This is because to make a user a member of multiple groups, you only need to add the user registration name to the user list fields of these groups.
You can use the groups command to list the names of all groups to which the current user belongs.
When a user logs on, the GID attribute in the/etc/passwd file is automatically assigned to the user, and the user group is listed in the/etc/group file.
Working group settings mainly include the following work items:
◆ Create and delete a working group;
◆ Modify group attributes;
◆ Adjust the user group;
◆ Set group permissions.
The command for adding a group is groupadd, the command for deleting a group is groupdel, and the command for modifying group attributes is groupmod. You can also use the desktop system to implement the above functions.
Set User Logon Environment
The preceding settings are the basic attributes of users. However, when using Linux, users still need the relevant working environment. Therefore, the administrator should set a logon environment for the user.
After a user logs on to the Linux system, the first software environment that a user usually accesses is the bash command interpreter, which is the most important software environment except the system core. In Linux, the configuration information of the software environment is usually stored in some configuration files.
The following are some important Shell environment configuration files:
◆/Etc/bashrc contains the command alias defined by the system and the bash environment variable definition.
◆/Etc/profile contains the system environment definition and specifies the programs that must be run at startup.
◆/Etc/inputrc contains the keyboard settings of the system and the key configuration information for different terminal programs.
◆ $ HOME/. bashrc includes the user-defined command alias and bash environment variable definition.
◆ $ HOME/bash_profile contains user-defined environment variables and specifies the programs to be started during user logon.
◆ $ HOME/. inputrc contains the user's keyboard settings and key bit configuration information for the user terminal.
These files are system script files written in Shell language. Generally, the configuration files in the user directory are roughly the same as those in the/etc directory.
User disk space limit
In Linux, the system administrator can control the use of hard disks. That is to say, to limit the size of the hard disk space used by users, the advantage is that the entire hard disk resources can be allocated fairly and reasonably, so that no user or some users occupy too much hard disk space, this causes inconvenience to other users.
In Linux, quota (Disk quota) is used to control users' hard disk resources. Quota can restrict the use of hard disk resources in two ways:
◆ Number of indexing nodes that the user can control;
◆ Number of hard disk partitions that can be accessed by the user.
The quota mechanism forces users to use their hard disks most of the time and disallow users from using the hard disk space without restrictions on the system.
This mechanism is based on users and file systems. If you create a file on more than one file system, you must set quota on each file system.
Generally, the quota configuration process is as follows:
(1) Ensure that quota is supported in the Linux kernel. That is to say, when configuring the core, the following core switch options are available:
Quota support (CONFIG_QUOTA)
It should be set to "Y" to enable the core to support the quota mechanism.
(2) install the quota-related software package. Typically Linux systems (for example, the red-flag Linux Server version) will install related software packages by default during system installation, the package naming method is generally quota-x.xx-x.i386.rpm. If the software package has not been installed, run the following command to install the package:
Rpm-ivh quota *. rpm
(3) modify the user's system startup script file to check the quota and enable the quota function when the system starts. The following is an example of an initial script file:
# Check the quota Program and enable the quota Disk quota Function
If [-x/sbin/quotacheck]
Then
Echo "Cheching quotas ......"
/Sbin/quotacheck-avug
Echo "[Done]"
Fi
If [-x/sbin/quotaon]
Then
Echo "Turning on quota ......"
/Sbin/quotaon-avug
Fi
The above script can be added to the file/etc/rc. d/rc. sysinit or/etc/rc. d/rc. local. However, you must load the file system specified by the user/etc/fstab before starting quota. Otherwise, quota will not run. This is because quota depends on the file system. You can set quota only after you load the file system.
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