Ubuntu Pastebin

Paste from zetheroo at Fri, 30 Oct 2015 10:36:42 +0000

Download as text
1
2
3
4
5
6
7
8
9
#!/bin/bash

while IFS=':' read -r login pass uid gid uname homedir comment; do
    if [[ "$homedir" = **/home/** ]]; then
        if [ -d "$homedir" ]; then
            echo chown -R $uid:$gid "$homedir";
        fi
    fi
done < /etc/passwd
Download as text