107.1 Manage User And Group Accounts And Related System Files Flashcards
Command that allows an ordinary user to delete a group.
sudo groupdel [group]
List the members of the sales group.
getent group sales
List all groups.
cat /etc/group
getent group | cut -d: -f1
Argument that specifies the absolute path to the user’s home directory when adding a new user.
useradd -d [path] [name]
useradd cannot be used to grant administrative privileges. (T/F)
True
Command with argument to delete a user, remove their home directory and files, and mail.
userdel –remove
Delete a user even if they are logged in.
userdel –force
usermod can be used to:
- add comments
- modify or move the home directory
- set account expiry
- change the user’s primary group
- add the user to additional groups
- remove a user from a group
- lock and unlock the user account
- specify the user’s shell
- set the user’s ID
usermod cannot be used to:
- delete any groups
2. change access permissions for a user
Command to create a system group.
groupadd -r
Commands that can be used to change a group’s password:
gpasswd, groupadd, groupmod
groupmod does not do what?
Add users to a group.
Command to change group ownership.
chgrp
chgrp cannot change what?
The group password.
Any user can run which command to see when their password will expire?
chage