X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=ud-replicate;h=0f98f8b0c2e4f05a38eae59743c101d06944017a;hb=65a87133ac45ecc72c0b41a8d88c8d7b7fa7b15b;hp=655b2634b6ad33b0c083dae3f0352a3261c75663;hpb=85b5893ebe019e46eac616141b87d55f63730523;p=mirror%2Fuserdir-ldap.git diff --git a/ud-replicate b/ud-replicate index 655b263..0f98f8b 100755 --- a/ud-replicate +++ b/ud-replicate @@ -68,6 +68,15 @@ done ln -sf `pwd -P`/ssh-rsa-shadow /etc/ssh ln -sf `pwd -P`/ssh_known_hosts /etc/ssh +find $HOST -name "ssh-rsa-shadow-*" -type f | while read f +do + user=$(echo $f | sed s@.*-@@) + id ${user} 2>/dev/null >/dev/null + if [ $? -eq 0 ]; then + chown $user $f + fi +done + if [ -x /usr/bin/dchroot ]; then CHROOTS=`dchroot --listpaths` for c in $CHROOTS; do