GX5 Security and File Permissions Flashcards

1
Q

5.1: Basic Security and Identifying User Types

What is the difference between root and standard users?

A

Root user: The superuser with full control over the system.

Standard user: Has limited privileges and cannot perform administrative tasks without elevated permissions.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

5.1: Basic Security and Identifying User Types

What are system users?

A

System users are accounts created for system processes and services, often with restricted access.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

5.1: Basic Security and Identifying User Types

What do the /etc/passwd, /etc/shadow, and /etc/group files store?

A

/etc/passwd: Stores user account information.

/etc/shadow: Stores encrypted passwords.

/etc/group: Stores group information.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

5.1: Basic Security and Identifying User Types

How do you display user information such as user ID, group ID, and groups?

A

Use the id command. Example: id username

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

5.1: Basic Security and Identifying User Types

What commands can you use to check who is logged in and what they are doing?

A

who: Shows who is logged in.

w: Shows who is logged in and their activity.

last: Displays a list of recent logins.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

5.1: Basic Security and Identifying User Types

What is the purpose of sudo and su?

A

sudo: Allows a permitted user to execute commands as the root user.

su: Switches to the root user or another user, requiring the root password.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

5.2: Creating Users and Groups

How do you add a new user to the system?

A

Use the useradd command. Example: useradd username

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

5.2: Creating Users and Groups

How do you add a new group?

A

Use the groupadd command. Example: groupadd groupname

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

5.2: Creating Users and Groups

What is the /etc/skel/ directory used for?

A

It contains default configuration files for new users.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

5.2: Creating Users and Groups

How do you set or change a user’s password?

A

Use the passwd command. Example: passwd username

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

5.3: Managing File Permissions and Ownership

What is the purpose of ls -l?

A

It lists files and directories with detailed information, including permissions, ownership, and file size.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

5.3: Managing File Permissions and Ownership

What is the purpose of ls -a?

A

It lists all files, including hidden files (those starting with a dot).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

5.3: Managing File Permissions and Ownership

What are the three types of file permissions?

A

Read (r): Allows viewing the contents of a file.

Write (w): Allows modifying the file.

Execute (x): Allows running the file as a program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

5.3: Managing File Permissions and Ownership

What does the command chmod do?

A

chmod changes the permissions of a file or directory. Example: chmod 755 file.txt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

5.3: Managing File Permissions and Ownership

What does the command chown do?

A

chown changes the ownership of a file or directory. Example: chown user:group file.txt

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

5.3: Managing File Permissions and Ownership

How are file permissions represented in ls -l?

A

Permissions are displayed as a 10-character string, e.g., -rwxr-xr–. The first character indicates the file type, and the next 9 characters represent read, write, and execute permissions for the user, group, and others.

17
Q

5.4: Special Directories and Files

What is the difference between /tmp/ and /var/tmp/?

A

/tmp/: Temporary files that may be deleted after a reboot.

/var/tmp/: Temporary files that persist across reboots.

18
Q

5.4: Special Directories and Files

What is the Sticky Bit?

A

A permission that ensures only the file owner, root, or the user who created a file can delete or modify it in a shared directory (e.g., /tmp).

19
Q

5.4: Special Directories and Files

How do you list directories without showing their contents?

A

Use ls -d. Example: ls -d /home/*

20
Q

5.4: Special Directories and Files

How do you create a symbolic link (symlink) in Linux?

A

Use the ln -s command. Example: ln -s /path/to/original /path/to/link