0
0
Linux CLIscripting~20 mins

Why user management secures systems in Linux CLI - Challenge Your Understanding

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
User Management Security Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
Why does limiting user permissions improve system security?
Imagine a shared computer where everyone can install any software they want. What is the main reason limiting user permissions helps keep the system safe?
AIt allows users to share files more easily with each other.
BIt prevents users from accidentally or intentionally changing important system files.
CIt makes the computer run faster by reducing user activity.
DIt increases the number of users who can log in at the same time.
Attempts:
2 left
💡 Hint
Think about what could happen if everyone could change system files.
💻 Command Output
intermediate
1:00remaining
What is the output of the user listing command?
You run the command cut -d: -f1 /etc/passwd on a Linux system. What does this command output?
Linux CLI
cut -d: -f1 /etc/passwd
AThe current logged-in user's home directory.
BA list of all user passwords in plain text.
CA list of all usernames on the system.
DThe system's hostname.
Attempts:
2 left
💡 Hint
The /etc/passwd file stores user account information separated by colons.
📝 Syntax
advanced
1:30remaining
Which command correctly adds a new user with a home directory?
You want to add a new user named 'alex' and create a home directory for them. Which command is correct?
Auseradd alex --create-home-dir
Badduser -d alex
Cadduser alex -home
Duseradd -m alex
Attempts:
2 left
💡 Hint
The '-m' option creates a home directory with useradd.
🔧 Debug
advanced
1:30remaining
Why does this user deletion command fail?
You run userdel alex but the user's home directory remains. Why?
Linux CLI
userdel alex
ABecause the command does not delete the user's home directory by default.
BBecause the user's processes are still running.
CBecause the command requires root privileges to run.
DBecause the user 'alex' does not exist.
Attempts:
2 left
💡 Hint
Check the command options for deleting home directories.
🚀 Application
expert
2:00remaining
How to securely allow a user to run a specific command as root?
You want to let user 'jane' run only the command systemctl restart apache2 with root privileges without giving full root access. Which approach is best?
AAdd a sudoers rule allowing 'jane' to run only 'systemctl restart apache2'.
BAdd 'jane' to the root group.
CGive 'jane' the root password.
DCreate a cron job that runs the command as root.
Attempts:
2 left
💡 Hint
Sudoers file controls specific command permissions.