0
0
Linux CLIscripting~10 mins

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

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to list all users on a Linux system.

Linux CLI
cat /etc/[1]
Drag options to blanks, or click blank then click option'
Ahosts
Bpasswd
Cshadow
Dgroup
Attempts:
3 left
💡 Hint
Common Mistakes
Using /etc/hosts instead of /etc/passwd
Using /etc/shadow which is for passwords only
2fill in blank
medium

Complete the command to add a new user named 'alice'.

Linux CLI
sudo [1] alice
Drag options to blanks, or click blank then click option'
Auserdel
Bpasswd
Cgroupadd
Duseradd
Attempts:
3 left
💡 Hint
Common Mistakes
Using userdel which deletes users
Using passwd which changes passwords
3fill in blank
hard

Fix the error in the command to change user 'bob' password.

Linux CLI
sudo [1] bob
Drag options to blanks, or click blank then click option'
Apasswd
Buseradd
Cusermod
Dgroupmod
Attempts:
3 left
💡 Hint
Common Mistakes
Using useradd which adds users
Using usermod which modifies user properties but not passwords
4fill in blank
hard

Fill both blanks to create a user 'charlie' with a home directory and default shell /bin/bash.

Linux CLI
sudo [1] -m -s [2] charlie
Drag options to blanks, or click blank then click option'
Auseradd
B/bin/sh
C/bin/bash
Dusermod
Attempts:
3 left
💡 Hint
Common Mistakes
Using usermod instead of useradd
Setting shell to /bin/sh instead of /bin/bash
5fill in blank
hard

Fill all three blanks to list all users with UID greater than 1000 from /etc/passwd.

Linux CLI
awk -F: '{{ if ($3 [1] [2]) print $1 }}' /etc/[3]
Drag options to blanks, or click blank then click option'
A<
B1000
Cpasswd
D>
Attempts:
3 left
💡 Hint
Common Mistakes
Using '<' instead of '>'
Using /etc/shadow instead of /etc/passwd