Linux Foundation Certified IT Associate (LFCA) — Question 2
Which of the following commands can be used to lock a user’s account so that they cannot log into a Linux server without removing any files, folders, or data?
Answer options
- A. lock
- B. usermod
- C. userdel
- D. chmod
Correct answer: B
Explanation
The correct answer is B, 'usermod', as it allows you to modify a user's account settings, including locking the account. Option A, 'lock', is not a standard command in Linux for this purpose, while C, 'userdel', is used to delete a user and their files, and D, 'chmod', is for changing file permissions, not user account states.