[Da-tools-commits] ./da-tools/userdir-ldap-sshkeys r362: set permissions for multiple ssh keyfiles in ud-replicate
Mark Hymers
mark at hymers.org.uk
Wed Dec 26 22:34:45 UTC 2007
------------------------------------------------------------
revno: 362
committer: Mark Hymers <mark at hymers.org.uk>
branch nick: userdir-ldap-common-sshkeys
timestamp: Wed 2007-12-26 22:34:45 +0000
message:
set permissions for multiple ssh keyfiles in ud-replicate
modified:
ud-replicate
-------------- next part --------------
=== modified file 'ud-replicate'
--- a/ud-replicate 2006-12-29 00:36:56 +0000
+++ b/ud-replicate 2007-12-26 22:34:45 +0000
@@ -64,6 +64,15 @@
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 at .*-@@)
+ 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
More information about the Da-tools-commits
mailing list