Challenge - 5 Problems
Sysadmin Automation Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:30remaining
Why do sysadmin scripts automate repetitive tasks?
Which of the following is the main reason sysadmin scripts automate repetitive tasks?
Attempts:
2 left
💡 Hint
Think about what happens when humans repeat the same task many times.
✗ Incorrect
Automating repetitive tasks helps reduce mistakes and saves time, making system management more efficient.
🧠 Conceptual
intermediate1:30remaining
What is a key benefit of automating system updates with scripts?
Why do sysadmins use scripts to automate system updates?
Attempts:
2 left
💡 Hint
Think about how automation helps keep systems secure and up to date.
✗ Incorrect
Automating updates ensures they happen regularly and correctly, improving system security and stability.
💻 Command Output
advanced2:00remaining
Output of a script automating user creation
What is the output of this bash script that automates adding a user named 'alice'?
Bash Scripting
#!/bin/bash username=alice if id "$username" &>/dev/null; then echo "User $username already exists" else sudo useradd "$username" && echo "User $username created" fi
Attempts:
2 left
💡 Hint
Assume the user 'alice' does not exist and the script runs with proper permissions.
✗ Incorrect
The script checks if 'alice' exists; if not, it creates the user and prints confirmation.
🔧 Debug
advanced2:00remaining
Identify the error in this automation script snippet
What error will this bash script produce when automating file backup?
code:
#!/bin/bash
backup_dir=/backup
file_to_backup=/etc/passwd
cp $file_to_backup $backup_dir
Attempts:
2 left
💡 Hint
Check how the cp command is used with directories and files.
✗ Incorrect
The cp command copies the file to the destination correctly (to /backup/passwd if /backup is a directory, or creates /backup otherwise). No error is produced assuming permissions allow.
🚀 Application
expert2:30remaining
How does automating log rotation improve system management?
Which of the following best explains how automating log rotation benefits system administrators?
Attempts:
2 left
💡 Hint
Think about what happens if logs grow without limits.
✗ Incorrect
Automated log rotation archives old logs and limits file size, preventing disk space issues and helping admins review logs efficiently.