Linux User Accounts Quiz
48 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 is the primary purpose of a user account in a Linux system?

  • To facilitate guest logins without restrictions
  • To create a security boundary for users and programs (correct)
  • To allow multiple users to run programs simultaneously
  • To provide shared access to all files
  • Which user account type has full system access on a Linux system?

  • Guest user
  • Superuser (correct)
  • Regular user
  • System user
  • How can you view the user ID and group information of the currently logged-in user?

  • Using the `ls -l` command
  • Using the `whoami` command
  • Using the `id` command (correct)
  • Using the `groups` command
  • What does the ls -ld command accomplish?

    <p>Shows the owner of a directory without displaying its contents</p> Signup and view all the answers

    What represents a security feature of user accounts on a Linux system?

    <p>Unique user identification numbers (UIDs)</p> Signup and view all the answers

    Which command would you use to find out about another user's group membership?

    <p>id username</p> Signup and view all the answers

    Which type of user account is primarily used for running background services?

    <p>System user</p> Signup and view all the answers

    What is typically assigned to human users for secure logins?

    <p>A unique secret password</p> Signup and view all the answers

    What file does the system refer to for user password verification?

    <p>/etc/shadow</p> Signup and view all the answers

    What command is used to configure password aging in a Linux system?

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

    If the maximum password age is set to 90 days, what happens after this period?

    <p>The user is forced to change their password.</p> Signup and view all the answers

    What does the '-E' option in the chage command specify?

    <p>Password expiration date</p> Signup and view all the answers

    What is the purpose of combining the salt with the plain text password during login?

    <p>To create a unique hash for each password</p> Signup and view all the answers

    What is the correct way to set a warning period of 7 days using the chage command?

    <p>-W 7</p> Signup and view all the answers

    What is indicated by the command 'chage -l cloudadmin10 | grep "Account expires"'?

    <p>It displays the expiration date of a user’s account.</p> Signup and view all the answers

    Which behavior indicates that a user may have left an SSH session open?

    <p>Using sudo to access other users' files</p> Signup and view all the answers

    What privilege does the superuser account allow in a Linux system?

    <p>Override normal file system privileges</p> Signup and view all the answers

    When is it recommended to use the root user account in Red Hat Linux?

    <p>Only when performing administrative tasks</p> Signup and view all the answers

    What does the su command do when executed by a normal user?

    <p>Switches to another user account with a password requirement</p> Signup and view all the answers

    What happens if you omit the username when using the su command?

    <p>It attempts to switch to the root user by default</p> Signup and view all the answers

    Which of the following statements is true regarding the use of the root account?

    <p>Compromising the root account endangers system security</p> Signup and view all the answers

    What does the su - command do differently from the su command?

    <p>Starts a login shell</p> Signup and view all the answers

    What is a common responsibility of the root user?

    <p>Administering user permissions for normal users</p> Signup and view all the answers

    Which of the following best describes the potential risk of using the root account?

    <p>It can lead to accidental system damage</p> Signup and view all the answers

    What command is used to set the maximum password age for the operator1 user to 90 days?

    <p>chage -M 90 operator1</p> Signup and view all the answers

    What is the significance of the command 'chage -d 0 operator1'?

    <p>It forces a password change on the first login for the operator1 account.</p> Signup and view all the answers

    How is the expiration date of the operator1 account set to 180 days from the current date?

    <p>By determining the future date with 'date -d '+180 days' +%F'</p> Signup and view all the answers

    What happens if a user tries to log in while their password is expired?

    <p>They will be required to change their password immediately.</p> Signup and view all the answers

    Which command would verify the password expiration details of the operator1 user?

    <p>chage -l operator1</p> Signup and view all the answers

    What does the output 'Password inactive: never' indicate regarding operator1's account?

    <p>There is no period where the account will be inactive after the password expires.</p> Signup and view all the answers

    Upon logging in as operator1 after changing the password, what is the expected prompt?

    <p>You must change your password immediately.</p> Signup and view all the answers

    What is the purpose of the command 'sudo -i' when executed by student?

    <p>To open an interactive root shell.</p> Signup and view all the answers

    What is the maximum number of days a password can be used as per the new configuration?

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

    Which command is used to edit the password aging policy in the configuration file?

    <p>vim /etc/login.defs</p> Signup and view all the answers

    What is the minimum number of days required between password changes?

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

    What happens to existing users when default password and account expiry settings are applied?

    <p>They are unaffected.</p> Signup and view all the answers

    How many days of warning are provided before a password expires?

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

    Which of the following is true regarding the creation of a supplementary group?

    <p>It allows members to run sudo commands.</p> Signup and view all the answers

    What is the purpose of setting PASS_WARN_AGE in the configuration?

    <p>To specify the number of days before password expiration that a warning is given.</p> Signup and view all the answers

    Which commands must be executed as root to create a new supplementary group and set its permissions?

    <p>sudo groupadd &amp; sudo visudo</p> Signup and view all the answers

    What is the minimum password length requirement indicated in the example?

    <p>8 characters</p> Signup and view all the answers

    How long will the accounts consultant1, consultant2, and consultant3 remain active before expiry?

    <p>90 days</p> Signup and view all the answers

    Which command is used to change the expiry date of a user account?

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

    What is the command to set a requirement for a user to change their password every 15 days?

    <p>chage -M 15</p> Signup and view all the answers

    What does the command 'chage -d 0 user' do?

    <p>Requires the user to change the password at their next login</p> Signup and view all the answers

    Which of the following user types does NOT typically exist in a Linux environment?

    <p>Anonymous users</p> Signup and view all the answers

    What files contain critical user and group information in a Linux system?

    <p>/etc/passwd, /etc/group, and /etc/shadow</p> Signup and view all the answers

    Which commands are primarily used for executing commands as the superuser?

    <p>su and sudo</p> Signup and view all the answers

    Study Notes

    Manage Local Users and Groups

    • User accounts provide security boundaries between users and programs.
    • Users are identified by usernames and unique identification numbers (UIDs).
    • User accounts are essential for system security; every process runs as a specific user.
    • File ownership determines access control for users.
    • User account types include superuser (root, UID 0), system users, and regular users.
    • Superusers have full system access.
    • System users run supporting services.
    • Regular users have limited access for daily tasks.

    User Accounts

    • User accounts are fundamental to system security.
    • Every process on the system runs as a particular user.
    • Every file has an owner.
    • The user associated with a running process determines the files and directories accessible to that process.

    Superuser

    • The superuser account (root) administers the system.
    • Root has a UID of 0.
    • Root has full system access.

    System Users

    • System users are used by processes that provide supporting services.
    • These processes (often called daemons) typically do not need superuser privileges.
    • System users have less access to protect their files from other processes and users.

    Regular Users

    • Most users have regular user accounts.
    • Regular users have limited system access for everyday work.

    User Management Commands

    • id: Displays information about the currently logged-in user or another user.
    • ls -l: Lists file details, the third field shows the owner name.
    • ps -au: Lists all running processes and shows the user associated with each process. -su/sudo: Allows users to temporarily take on the privileges of another user. The sudo command is commonly used in situations where access to the root user is required without needing the user to know the password of the root user. This offers more security features than su.

    Linux File Structure

    • /etc/passwd: Contains information about local users (username:encrypted password:uid:gid:user comment:home directory:shell).
    • /etc/group: Contains information about local groups (group name:password field:GID:list of user names).

    Studying That Suits You

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

    Quiz Team

    Related Documents

    Description

    Test your knowledge about user accounts in Linux systems. This quiz covers various aspects such as user account types, commands for managing user information, and security features associated with user accounts. Perfect for those looking to strengthen their understanding of Linux administration.

    More Like This

    Linux User Management Quiz
    41 questions

    Linux User Management Quiz

    PainlessTriangle9252 avatar
    PainlessTriangle9252
    Use Quizgecko on...
    Browser
    Browser