The "Home Directory Not Available - Aborting" error occurs when a user attempts to log in (via SSH, FTP, or a web application), but their home directory is missing, incorrectly set, or has incorrect permissions. This can happen due to:
/etc/passwd.Here's how a system administrator can troubleshoot and resolve the problem.
The first step is to check whether the home directory is missing.
Run the following command to check the user's home directory:
/home/username) specifies the user's home directory./bin/bash) specifies the shell.Run:
If the directory does not exist, you will see an error like:
If the directory is missing, proceed to Step 2.
If the home directory is missing, create it manually.
mkdir -p /home/username: Creates the directory if it does not exist.chown username:username /home/username: Sets the correct ownership.chmod 700 /home/username: Ensures only the user has access.To restore default user files, copy them from /etc/skel/:
Note: Now, try logging in again.
If the home directory exists but the user still cannot log in, verify ownership and permissions.
If the owner is root instead of the user, fix it:
If this error occurs when logging in via SSH, check /etc/ssh/sshd_config to ensure UsePAM is enabled.
Look for the following settings and ensure they are correctly configured:
Then restart SSH:
Check if the user account is locked:
If the output shows "locked", unlock it:
If the disk is full, users may be unable to log in or access their home directories.
If /home or / is 100% full, clear unnecessary files.
If everything appears correct but the issue persists, restart the server:
| Step | Action |
|---|---|
| 1 | Verify home directory with grep username /etc/passwd |
| 2 | Create the home directory using mkdir -p /home/username |
| 3 | Check ownership with ls -ld /home/username and fix with chown |
| 4 | Verify SSH settings and restart SSH | 5 | Ensure the account is not locked with passwd -S username |
| 6 | Check disk space with df -h |
| 7 | Restart the server if needed |
By following these steps, you can resolve the "Home Directory Not Available - Aborting" error and restore user access.