LFCS User and Group Management Practice Question
A security policy requires that all users in the 'admin' group must have a umask of 027 set automatically upon login. An administrator adds 'umask 027' to /etc/profile. However, users report that the umask is still 022. What is a likely cause?
⚠ Common exam trap
Test-takers frequently assume /etc/profile is the final authority for login shell settings, but they overlook that user-specific dotfiles are sourced after it and can override variables like umask.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The umask in /etc/profile is overridden by user-specific .bash_profile or .bashrc files.
User-specific shell configuration files (like ~/.bash_profile, ~/.bash_login, or ~/.profile for login shells, and ~/.bashrc for interactive non-login shells) are sourced after /etc/profile. These files can override the system-wide umask setting with a user-defined value, such as the default 022. Since the administrator only modified /etc/profile, any existing user-specific umask command in their personal dotfiles will take precedence.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
The umask in /etc/profile is overridden by user-specific .bash_profile or .bashrc files.
Why this is correct
Login shells read /etc/profile first, then ~/.bash_profile, ~/.bash_login or ~/.profile. If any of these later files sets umask 022, it overwrites the earlier 027 value, so the policy fails despite the correct edit to /etc/profile.
- ✗
The umask command in /etc/profile has a syntax error that is silently ignored.
Why it's wrong here
A malformed umask line would produce an error message, and the stated value 027 is valid syntax, so silent failure does not explain the retained 022. Syntax errors are tempting to blame because they are common in shell scripts, but they would be the cause only if the command itself were mistyped.
- ✗
The admin placed the umask command after the call to /etc/bash.bashrc which resets it.
Why it's wrong here
/etc/profile does not call /etc/bash.bashrc; the ordering is the reverse, and bash.bashrc is read by non-login interactive shells. This is tempting because later configuration files can override earlier settings, which would be the cause if a subsequent profile script reset the umask.
- ✗
The admin forgot to run 'source /etc/profile' on each user's session.
Why it's wrong here
/etc/profile is read by the login shell at each login, so no manual sourcing is needed; the change applies automatically to new sessions. Re-sourcing is tempting because it forces a shell to re-read configuration, which is the correct fix only when testing edits in an already-running interactive shell.
Go deeper
Related to this question
About these practice questions
Courseiva writes every LFCS question from scratch — 406 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LFCS practice question is part of Courseiva's free Linux Foundation certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LFCS exam.