12 lines
460 B
Bash
12 lines
460 B
Bash
#!/bin/bash
|
|
|
|
# Intentionally, it will not update files that already exist, but it cannot identify files a user has deleted that you want to put back again so those will be recreated.
|
|
# It will not update root's files at all.
|
|
|
|
getent passwd |
|
|
while IFS=: read username x uid gid gecos home shell
|
|
do
|
|
[[ "$username" == root || ! -d "$home" ]] && continue
|
|
tar -cf - -C /etc/skel . | sudo -Hu "$username" tar --skip-old-files -xf -
|
|
done
|