QuizzesUsers, Groups & sudo — Concept Check
intermediate
linux

Users, Groups & sudo — Concept Check

Questions on Users, Groups & sudo. Linux multi-user system — every process runs as a user, every file has an owner. Understanding users, groups, /etc/passwd, /etc/shadow, and sudo is essential for system administration and security.

8 minutes 8 questions Pass at 70%
Time Limit
8 minutes - timer starts when you begin
Change Answers Freely
Revisit and change any answer before submitting
Full Review After Submit
Correct answers and explanations shown for every question
Auto-submit on timeout
Quiz submits automatically when time runs out

Questions in this quiz

8 questions on Users, Groups & sudo — Concept Check. Work through them here, then start the quiz to answer them and see your score.

  1. 1.A new user 'rahul' needs a home directory and bash shell. Which command should you use?

    • Auseradd -s /bin/zsh rahul
    • Buseradd -m -s /bin/bash rahul
    • Cuseradd -m -s /sbin/nologin rahul
    • Duseradd -r -s /bin/bash rahul
  2. 2.You want to add the user 'akshay' to the 'docker' group without removing him from other groups. Which command achieves this?

    • Ausermod -G docker akshay
    • Busermod -aG docker akshay
    • Cusermod -r docker akshay
    • Dgroupadd docker akshay
  3. 3.A service account 'www-data' should have no interactive login. Which useradd option ensures this?

    • A-s /bin/sh
    • B-r -s /bin/zsh
    • C-m -s /bin/bash
    • D-s /sbin/nologin
  4. 4.You notice 'akshay' can run 'sudo !!' to re-run the last command as root. What does this imply?

    • AAkshay has sudo privileges
    • BAkshay is in the root group
    • CAkshay's account is locked
    • DAkshay's shell is misconfigured
  5. 5.The file /etc/shadow is not readable by normal users. Why is this important?

    • AIt stores hashed passwords
    • BIt holds user home directories
    • CIt contains user UIDs
    • DIt lists all system groups
  6. 6.You run 'groups akshay' and see 'docker'. What does this indicate?

    • AAkshay cannot run docker commands
    • BAkshay is the owner of the docker group
    • CAkshay is a member of the docker group
    • DAkshay is not in any group
  7. 7.What is the primary purpose of the /etc/sudoers file?

    • AControl who can run commands as root
    • BList all system users
    • CDefine user home directories
    • DStore user passwords securely
  8. 8.You need to lock the user account 'akshay'. Which command should you use?

    • Auserdel -r akshay
    • Busermod -L akshay
    • Cusermod -s /sbin/nologin akshay
    • Dusermod -U akshay