โ† All LCA Flashcard Decks

User & Permission Management Flashcards

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

Read the first 7 User & Permission Management flashcards as text
  1. Which command displays the numeric UID and GID of the current user along with all supplementary group memberships?

    Answer: id

    The id command shows the current user's UID, primary GID, and all supplementary group IDs.

  2. What does the command 'newgrp developers' accomplish?

    Answer: Starts a subshell with developers as the effective primary group

    newgrp opens a new shell session where the specified group becomes the user's effective primary group for that session.

  3. Which useradd option specifies a comment (GECOS field) such as the user's full name?

    Answer: -c

    The -c option sets the GECOS/comment field, typically used for the user's full name or description.

  4. A file has permissions 664. What is the symbolic equivalent for the 'others' portion?

    Answer: r--

    The last octal digit 4 equals binary 100, which maps to read-only (r--).

  5. Which file defines default settings (like UMASK and home directory skeleton path) used by useradd?

    Answer: /etc/default/useradd

    /etc/default/useradd stores defaults for the useradd command such as SHELL, HOME, INACTIVE, and EXPIRE.

  6. What effect does setting UMASK to 027 have on newly created files?

    Answer: Files get permissions 640

    A umask of 027 subtracts from the default 666 for files: 666 - 027 = 640 (rw-r-----).

  7. Which command is used to add an existing user 'alice' to the supplementary group 'sudo' without removing her from other groups?

    Answer: usermod -aG sudo alice

    usermod -aG appends the specified group to the user's supplementary groups; omitting -a would replace all supplementary groups.