Chapter 1
System Management
Course: Comptia Linux Xk0 006
Subject: Comptia Linux Xk0 006
Chapter: Troubleshooting
In a multi-user Linux environment, users often face issues accessing files or logging in due to misconfigured permissions, incorrect group membership, missing password policies, or exceeded quotas. Effective troubleshooting requires understanding how user identity, access rights, system policies, and file attributes interact.
1. User Login Issues
User login issues in Linux environments can be disruptive and are often due to authentication failures, configuration errors, or policy enforcement mechanisms. Diagnosing such problems requires checking both system-level and user-level configurations, as well as analyzing logs for error patterns.
Common Causes
- Incorrect Username or Password The most basic issue. This may be due to user error, but can also stem from changes to PAM modules or authentication backends (e.g., LDAP or Kerberos). To rule out brute-force lockouts or password policy enforcement, consult the PAM configuration at /etc/pam.d/.
- Account Locked (passwd -l) Linux administrators can lock a user account as a temporary measure. A locked account has an exclamation mark ! in the password field of /etc/shadow. Example: perl user:hash... → active user:!hash... → locked
- Expired Password or Account (chage -l username) The chage command manages account aging policies. If Password expires or Account expires fields are set and expired, logins will be denied.
- Invalid or Non-Interactive Shell Accounts with shell set to /sbin/nologin, /bin/false, or an invalid path cannot log in interactively (e.g., via SSH). Check the user's shell: bash getent passwd username | cut -d: -f7
- Missing or Inaccessible Home Directory If the user’s home directory doesn’t exist, or lacks correct ownership and permissions, the shell may fail to launch. Ensure: bash ls -ld /home/username
- Permission Issues with Login Files Files like .bashrc, .bash_profile, .ssh/authorized_keys, and .profile may block login if: