7.2.8 Ensure local interactive user home directories are configured

Information

The user home directory is space defined for the particular user to set local environment variables and to store personal files. While the system administrator can establish secure permissions for users' home directories, the users can easily override these. Users can be defined in /etc/passwd without a home directory or with a home directory that does not actually exist.

Since the user is accountable for files stored in the user home directory, the user must be the owner of the directory. Group or world-writable user home directories may enable malicious users to steal or modify other users' data or to gain another user's system privileges. If the user's home directory does not exist or is unassigned, the user will be placed in "/" and will not be able to write any files or have local environment variables set.

Solution

- If a local interactive user's home directory is undefined and/or does not exist, follow local site policy and perform one of the following:

- Lock the user account
- Remove the user from the system
- Create a directory for the user. If the home directory is undefined, set it to the absolute path of that directory:

# usermod --home <directory> <username>

- For each existing home directory reported by the Audit Procedure, make changes in accordance with local site policy and apply the corresponding action:

- The directory is not owned by its user - set the owner:

# chown <user> <home_directory>

- The directory is more permissive than mode 0750 - remove the excess permissions:

# chmod g-w,o-rwx <home_directory>

See Also

https://workbench.cisecurity.org/benchmarks/27893

Item Details

Category: ACCESS CONTROL, MEDIA PROTECTION

References: 800-53|AC-3, 800-53|AC-5, 800-53|AC-6, 800-53|MP-2, CSCv7|14.6

Plugin: Unix

Control ID: 871cdc114425c0df18180285e02205bc6072b60c5754fa7ffd4523b0c18e4473