MODULE 16- Creating Users and Groups Flashcards
What do we call A group created automatically for each new user, where the group name matches the username and the only member is the user themselves?
a User Private Group (UPG).
What file stores local group configuration information?
/etc/group
How can you allow multiple users to share files and collaborate through common permissions?
By creating a group.
Which command is used to search for a specific group entry in the /etc/group file?
grep — e.g., grep groupname /etc/group
Which command can be used to view both local and network-based group records?
getent — e.g., getent group groupname
What command syntax would you use to find all group entries containing the word “admin”?
grep admin /etc/group
Which option allows you to manually assign a Group ID (GID) when creating a group?
-g (used as in groupadd -g 1005 groupname)
How can you confirm that a group named development was created successfully?
Run grep development /etc/group
Which command is used to create a new group in Linux?
groupadd
In which type of Linux distribution is a UPG typically created when a new user is added?
Red Hat-based distributions (e.g., RHEL, CentOS)
Which command will allow you to add the sysadmin user into the root group?
usermod -aG root sysadmin
What is the relationship between a UID and a UPG’s GID in Red Hat-based systems?
The UID and the UPG’s GID match — they are the same number.
What GID range is reserved for system use in Red Hat-based distributions? What GID range is reserved for system use in Debian-based distributions?
GIDs under 500 for Red Hat and GIDs under 1000 for Debian are reserved for system use.
Which characters are allowed as the first character of a group name?
An underscore (_) or a lowercase alphabetic character (a–z).
Which option should be used with groupadd to assign a system-level GID?
-r (e.g., groupadd -r groupname)
What is the purpose of the -r option in the groupadd command?
It assigns a system-level GID (lower than the standard GID range).
What characters are allowed in the rest of the group name (after the first character)?
Alphanumeric characters, hyphen (-), or underscore (_).
What should group names not end with?
a hyphen (-)
What would groupmod -n marketing sales do?
Rename the group sales to marketing.
What is the maximum number of characters allowed in a group name on most Linux distributions?
32 characters, though some distributions may enforce a limit of 16.
Which command is used to modify an existing group?
groupmod
What does the -n option do in the groupmod command?
Changes the name of an existing group.
What does the -g option do in the groupmod command?
Changes the GID (Group ID) of an existing group.
What is an “orphaned” file in the context of group ownership?
A file that is owned by a GID that no longer maps to a named group in /etc/group