tailieunhanh - Module Linux essentials - Module 14: Managing users and groups

Module Linux essentials - Module 14 introduce managing users and groups. After studying this chapter students should be able to: Creating users and groups, understanding user and group commands, creating user IDs. | Module 14 Managing Users and Groups Exam Objective Creating Users and Groups Objective Summary Understanding user and group commands Creating User IDs Working with Groups Creating a Group The most common reason to create a group is to provide a way for users to share files. After creating or modifying a group, you can verify the changes by viewing the /etc/group file or running the getent command. The groupadd Command The groupadd command creates a new group. The -g option can be used to specify a group id: groupadd -g 506 research If the -g option is not provided, the groupadd command will automatically provide a GID for the new group. Group ID Considerations Avoid creating GIDs in the same numeric ranges where you expect to create user IDs if your system uses UPG. Recall that GIDs of under 500 are reserved for system use. The -r option will assign the new group a GID that will be less than the lowest standard UID. Group Naming Considerations The first character of the name should be either an underscore (_) or a lower-case alphabetic character (a-z). Up to 32 characters are allowed on most Linux distributions, but using more than 16 can be problematic as some distributions may not accept more than 16. After the first character, the remaining characters can be alphanumeric, dash (-) and underscore(_). The last character should not be a hyphen (-). Modifying a Group The groupmod –n command changes a group’s name. The groupmod –g command changes a group’s ID. If you change the GID for a group, then all files that were associated with that group will no longer be associated with that group. These are called “orphaned” files. To find “orphaned” files: find / -nogroup Deleting a Group Delete a group with the groupdel command. This may result in “orphaned” files. Only supplemental groups can be deleted. Working with Users The /etc/default/useradd File The /etc/default/useradd file is used to define default settings when creating user accounts. Default settings can . | Module 14 Managing Users and Groups Exam Objective Creating Users and Groups Objective Summary Understanding user and group commands Creating User IDs Working with Groups Creating a Group The most common reason to create a group is to provide a way for users to share files. After creating or modifying a group, you can verify the changes by viewing the /etc/group file or running the getent command. The groupadd Command The groupadd command creates a new group. The -g option can be used to specify a group id: groupadd -g 506 research If the -g option is not provided, the groupadd command will automatically provide a GID for the new group. Group ID Considerations Avoid creating GIDs in the same numeric ranges where you expect to create user IDs if your system uses UPG. Recall that GIDs of under 500 are reserved for system use. The -r option will assign the new group a GID that will be less than the lowest standard UID. Group Naming Considerations The first character of the name .

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.