Search Header Logo
5.1 Linux Security

5.1 Linux Security

Assessment

Presentation

Computers

8th Grade - Professional Development

Practice Problem

Easy

Created by

Sarah Hess

Used 4+ times

FREE Resource

13 Slides • 8 Questions

1

5 - Security and File Permissions

By Sarah Hess

2

media

Security - Control who can access what

Concept: Principle of Least Privilege

Linux OS's based off of Unix (50+ Years Old!)

Why Accounts

3

media

UID: User ID
GID: Group ID

Every user has a UID and PRIMARY GID

Groups can have 1 or many users

Users can be in 1 or many groups

Identifiers

4

Multiple Choice

What is the main philosophy of Linux security?

1
Full access for all users
2
Principle of least privilege
3
No user authentication required
4
Mandatory encryption for all files

5

media

Root UID is 0 - SUPERUSER!

Standard User ID's > 1000
- Have defined home directory (usually subdirectory of /home)
- Defined login shell (default Bash in /bin/bash)


Types of Linux User Accounts

6

media

Typically pre-created at system/services installation

Used by facilities/programs/services that don't require SU

-
No dedicated home directory
-
No valid login shell

System & Service Accounts

7

media

Command: id

​Shows UID and name, primary GID and name and additional groups

Get Information About Users

8

Multiple Choice

Which group ID is shown first in the id command?

1
Session ID
2
Primary group ID
3
Secondary group ID
4
User ID

9

Multiple Choice

What does UID stand for in Ubunu?

1
Unique Identifier
2
Uniform Identifier
3
Universal ID
4
User Identification

10

media

Command: chsh
-Some users need to boot into shell

-Default is BASH (bourne again shell, what you've been learning)
-Can define different default shell using chsh

-Try change your shell to /usr/bin/zsh (zshell)

Change default shell.

11

Multiple Choice

Why would you use chsh?

1

To change a user’s password

2

To change a user’s default login shell

3

To create a new user account

4

To modify file permissions

12

media

Command: last
Shows when users last logged into the system

Command:
lastb
Shows last BAD attempts to login

When did users log in?

13

media

Commands who and w differ slightly

Think of effectiveness as a server admin

Currently Active?

14

Multiple Choice

What differentiates the who and w command?

1
The 'who' command displays the current date, while 'w' shows network statistics.
2
The 'who' command lists processes, while 'w' shows memory usage.
3
The 'who' command shows logged-in users, while 'w' shows users and their activity.
4
The 'who' command shows system uptime, while 'w' shows disk usage.

15

media
  • su - switches to root (needs root password) or su user switches user

  • sudo runs individual commands as root

Switching Users and Privilege Escalation

16

Multiple Choice

Why is sudo preferred over su in modern Linux?

1

It's faster

2

It enables accidental elevated actions

3

It doesn’t share the root password

4

It opens a GUI

17

media
  • /etc/passwd: User info

  • /etc/shadow: Password hashes

  • /etc/group: Group info

  • /etc/sudoers: Sudo permissions

Access Control Files

18

Match

Match the following

/etc/passwd

/etc/shadow

/etc/group

/etc/sudoers

User info

Password hashes

Group id

Sudo permissions

19

media
  • /etc/shadow stores one-way password hashes

  • Hashes are salted and not reversible

Password Hashing

20

Multiple Choice

In the /etc/shadow file passwords are stored in what format?

1

open

2

hash

3

salt

4

mesh

21

Review

-Accounts are used for security
-UID and GID numbers define users and groups (user IDs > 1000)
-Root is account 0
-Typically standard users have a home directory, system and service accounts do not
-Command id shows user information
-last shows the last time users logged in
-who and w show active users
-su switch user to root/another user
-sudo inline privilege escalation
-etc passwd, shadow, group, sudoers directories have user information
-shadow has user passwords hashed

5 - Security and File Permissions

By Sarah Hess

Show answer

Auto Play

Slide 1 / 21

SLIDE