← All Linux Flashcard Decks

CompTIA Linux+ Security and Access Control Flashcards

7 cards from real Linux practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 7 CompTIA Linux+ Security and Access Control flashcards as text
  1. Which command displays the current SELinux enforcement mode?

    Answer: getenforce

    getenforce prints the current SELinux mode: Enforcing, Permissive, or Disabled.

  2. A file has permissions -rwsr-xr-x. What does the 's' in the owner execute position indicate?

    Answer: SUID bit is set

    An 's' in the owner execute position means the SUID (Set User ID) bit is set, causing the file to run with the owner's privileges.

  3. Which PAM module enforces password complexity requirements on Linux?

    Answer: pam_pwquality.so

    pam_pwquality.so checks password strength and enforces complexity rules such as minimum length and character classes.

  4. What does the 'sticky bit' do when applied to a directory like /tmp?

    Answer: Allows only the file owner or root to delete files within it

    The sticky bit on a directory restricts file deletion so only the file's owner, the directory's owner, or root can remove files.

  5. Which file defines the default password aging policy for new user accounts on a Linux system?

    Answer: /etc/login.defs

    /etc/login.defs contains system-wide defaults for password aging, UID/GID ranges, and other account parameters.

  6. A sysadmin wants to prevent a user from logging in interactively. Which shell assignment achieves this?

    Answer: /sbin/nologin

    /sbin/nologin is the standard shell to assign when blocking interactive logins while still allowing service accounts to function.

  7. Which command is used to add a user to a supplementary group without removing existing group memberships?

    Answer: usermod -aG groupname username

    usermod -aG appends the user to the specified group; without -a, the -G option would replace all supplementary groups.