Module 15: System and User Security
7 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What command is used to switch to another user account in a Linux system while obtaining their environment settings?

  • sudo -u username
  • su - username (correct)
  • login username
  • su username
  • What is a key risk associated with using the root account directly?

  • User might forget their password
  • Accidental execution of non-administrative tasks as root (correct)
  • Background processes may fail
  • Only certain commands can be executed
  • What information does the 'who' command provide about users?

  • Shows usernames along with their login times and locations (correct)
  • Lists the primary group for all users logged in
  • Displays only the usernames and passwords of currently logged-in users
  • Provides details on user permissions and roles
  • What is the main purpose of creating groups in a system?

    <p>To allow users to share files</p> Signup and view all the answers

    What is a consequence of creating GIDs under 1000?

    <p>They are reserved for system use and could cause conflicts</p> Signup and view all the answers

    Which command shows both local and network-based groups?

    <p>getent</p> Signup and view all the answers

    What does the command 'grep root /etc/group' accomplish?

    <p>It displays information about the root group</p> Signup and view all the answers

    Study Notes

    Module 15: System and User Security

    • Exam Objective 5.1 covers basic security and identifying user types on a Linux system.
    • The objective focuses on various user types within a Linux environment.

    Identifying User Accounts

    • User accounts are designed to secure a Linux operating system.
    • Accounts control file and directory access rights based on file permissions.

    Users and Permissions

    • User accounts belong to groups.
    • This module covers commands to view user and group details and navigate between them.

    Administrative Accounts

    • Some commands require administrative or root privileges.
    • Using the root account carries risks, so sudo or su are recommended for executing commands as root.
    • Risks of logging in as root:
      • All processes run with root privileges.
      • Easier to accidentally run non-admin tasks as root.

    Switching Users

    • The su command allows running a shell as a different user.
    • The su command with the [username] parameter opens a new shell.
    • After pressing Enter, the correct password for the target user is needed.

    Executing Privileged Commands

    • The sudo command enables executing commands as another user.
    • It's useful for distributions where root login isn't permitted.
    • Unlike su, sudo prompts for your own password. This prevents a possible compromise of root privileges.

    User Accounts

    • The /etc directory contains files defining user and group accounts.
    • The /etc/passwd file provides user account information (name, password placeholder, UID, primary group ID, comment, home directory, shell). Fields are separated by colons.

    Passwords

    • The /etc/shadow file contains encrypted user passwords (access requires root privileges).
    • Fields in /etc/shadow include username, encrypted password, last password change, minimum/maximum password age, warning before password expiry, inactive period and password expiry time.

    System Accounts

    • Users typically log in using regular accounts (UID > 1000).
    • The root account has UID 0 and special access.
    • System accounts (UID 1-499) manage services on the system.
    • System accounts in /etc/passwd and /etc/shadow may have different fields (like home directory, shell, password).

    Group Accounts

    • Users can belong to one or more groups.
    • The /etc/passwd file specifies the primary group membership.
    • The /etc/group file defines additional or secondary group memberships.
    • Group information includes the group name, password holder(an 'x' indicates no password), group ID, and list of members in the group file.

    Viewing User Accounts

    • The id command displays user and group information (UID, username, primary group, and details of other groups).

    Viewing Current Users

    • The who command lists currently logged-in users, their terminal, and login times.

    • The w command provides a more detailed view of logged-in users, including system status like user activity and load average.

    Viewing Login History

    • The last command displays login history, including previous and current login sessions. It gathers information from the /var/log/wtmp file.

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Related Documents

    Description

    This quiz covers Module 15 of System and User Security, focusing on identifying user accounts and understanding the role of permissions in a Linux environment. It highlights different user types, including administrative accounts, and illustrates how to switch users while maintaining system security. Test your knowledge of Linux user management and permissions with this quiz.

    More Like This

    Use Quizgecko on...
    Browser
    Browser