Check User Home Directory Ownership
Scanned 9/3/2026
Install to Claude Code
npx -y skills add CyberStrikeus/CyberStrike --skill cis-ubuntu1204-v110-13-13 --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Cis Ubuntu1204 V110 13 13?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/cyberstrikeus-cis-ubuntu1204-v110-13-13)More formats (shields.io, HTML) on the badges page.
---
name: cis-ubuntu1204-v110-13-13
description: "Check User Home Directory Ownership"
category: cis-os-hardening
version: "1.1.0"
author: cyberstrike-official
tags: [cis, ubuntu, 12.04, linux, user-management, home-directory, ownership, file-permissions]
cis_id: "13.13"
cis_benchmark: "CIS Ubuntu 12.04 LTS Server Benchmark v1.1.0"
tech_stack: [ubuntu, linux]
cwe_ids: []
chains_with: []
prerequisites: []
severity_boost: {}
---
# 13.13 Check User Home Directory Ownership (Scored)
## Profile Applicability
- Level 1
## Description
The user home directory is space defined for the particular user to set local environment variables and to store personal files.
## Rationale
Since the user is accountable for files stored in the user home directory, the user must be the owner of the directory.
## Audit Procedure
### Using Command Line
This script checks to make sure users own the home directory they are assigned to in the `/etc/passwd` file.
```bash
#!/bin/bash
cat /etc/passwd | awk -F: '{ print $1 " " $3 " " $6 }' | while read user uid dir; do
if [ $uid -ge 500 -a -d "$dir" -a $user != "nfsnobody" ]; then
owner=$(stat -L -c "%U" "$dir")
if [ "$owner" != "$user" ]; then
echo "The home directory ($dir) of user $user is owned by $owner."
fi
fi
done
```
## Expected Result
No output should be returned. Any output indicates home directories not owned by the assigned user.
## Remediation
### Using Command Line
Change the ownership of any home directories that are not owned by the defined user to the correct user.
## Default Value
Home directories are owned by the user when created with `useradd -m` or `adduser`.
## References
- CIS Ubuntu 12.04 LTS Server Benchmark v1.1.0
## Profile
Level 1 - Scored
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!