CHAPTER EIGHT Flashcards
(27 cards)
- Username
- Password placeholder (x)
- User ID (UID) number for each user
- Group ID (GID) primary group
- Comment
- Home directory - personal folder
- Shell -command line environment used
Command: su -
Become root user
Command: useradd -m name
Create user or home folder
Command: usermod -s/bin/bash name
Change shell
Command: usermod -u 444 name
Change user id
Command: usermod - - comment “tom cat” name
Add comment
The skeleton folder
This folder contains default files and folders that are automatically copied into the home directory of any new user when they are created using the useradd -m command.
Group
A group is a collection of users who share the same role or purpose. All groups have their info stored in the file/etc/group.
- Group name
- X group password
- GID group id number
- Stores usernames of the group members
Command: usermod -aG cartoon name
Add one user
Command: usermod -aG developer name
Add many users to a group
Primary groups
Every user in Linux must be a member of a primary group. They are referred to as login groups. by default when a new user is created, a group is also created with the same name as the user.
secondary groups
a user may or may not be a member of a secondary group. secondary groups are also sometimes referred to as supplementary groups. think of it as any group that a user is a member of aside from the user’s primary group
check ownership
chown is - I filename
change ownership and check ownership
chown user filename
change just group ownership
chown :group filename
premission types
r - read
w - write
x - execute
permissions for a file
r - be able to view the contents
w - be able to edit the file contents
x - able to run file if executable
Permissions for directory
r - be able to list the directory contents
w - be able to create and remove files in the directory
x - be able to change to the directory
Command: chmod o+w filename
add write for others
Command: chmod a+x filename
add execute for everyone
command: chmod g=r filename
set read-only for group
command: chmod ug=rwx filename
Give full r,w,x control
Command: chmod a= filename
remove all permissions