In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Grpck
The grpck directive verifies the integrity of the group files "/ etc/group" and "/ etc/gshadow". The check includes the correct number of fields, a unique valid group name, a valid group identifier, a valid list of members and administrators, and corresponding entries in the "/ etc/gshadow" file. It is fatal to check the correct number of fields and unique group names. If the entry has the wrong number of fields, the user is prompted to delete the entire row. If the user does not answer affirmatively, all further checks will be bypassed. Prompts you to delete entries with duplicate group names, but the rest of the checks will still be done. All other errors are warnings and users are encouraged to run the groupmod command to correct them.
Commands that operate on the "/ etc/group" and "/ etc/gshadow" files cannot change corrupted or duplicate entries. In this case, grpck should be used to delete the violation entry.
The scope of this command: RedHat, RHEL, Ubuntu, CentOS, SUSE, openSUSE, Fedora.
1. Grammar
Grpck [options] group
2. List of options
Option
Description
-- help
Show help documentation
-- version
Show command version
-r
Run in read-only mode
S
Use gid to sort group and gshadow
3. Configuration
The following configuration variables in "/ etc/login.defs" change the behavior of the tool:
MAX_MEMBERS_PER_GROUP (number), the maximum number of members for each group entry. When the maximum is reached, start a new group entry (line) in "/ etc/group" (with the same name, same password, and same GID). The default value is 0, which means that there is no limit to the number of members in the group. This feature (split grouping) allows you to limit the length of lines in a group file. This is useful for ensuring that the lines of the NIS group are no more than 1024 characters. If you need to enforce such restrictions, you can use 25. Note: split grouping may not support all tools (even in the Shadow tool set). You should not use this variable unless you really need it.
4. Files
/ etc/group, group account information.
/ etc/gshadow, security group account information.
/ etc/passwd, user account information.
5. Examples
1) check group information
[root@localhost david] # grpck / / check the group information and return without any errors
[root@localhost david] # echo $?
2) sort / etc/group
[root@localhost david] # tail-n 2 / etc/group / / View group information
Smmsp:x:51:
Webalizer:x:67:
User01:x:502:
Group02:x:999:
[root@localhost david] # grpck-s / etc/group / / sort by gid
[root@localhost david] # tail-n 2 / etc/group / / View information, sorted
User01:x:502:
Group02:x:999:
Nfsnobody:x:65534:
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.