# Cis Ubuntu1204 V110 13 13

> Check User Home Directory Ownership

- Skill: `cyberstrikeus/cis-ubuntu1204-v110-13-13` (Agent Skill)
- Install (CLI): `npx skillmds@latest add cyberstrikeus/cis-ubuntu1204-v110-13-13`
- Raw SKILL.md: https://api.skillmd.com/api/skills/cyberstrikeus/cis-ubuntu1204-v110-13-13/raw
- Safety review: PASS (external: skill-scanner PASS, skillspector CAUTION)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: cyberstrikeus (https://skillmd.com/u/cyberstrikeus)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/cyberstrikeus/cis-ubuntu1204-v110-13-13

---


# 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

