2009/10/12 Martin Langhoff <martin.langh...@gmail.com>:
> So that's the issue. I think you sent the wrong patch. No awk line in
> the patch, at least that I can see...

Odd, lets try again.
--- create_user.orig    2009-10-12 12:36:44.000000000 +0545
+++ create_user 2009-10-12 12:36:44.000000000 +0545
@@ -99,6 +99,11 @@
 
 mkdir -p --mode=700 .ssh || clean_up_and_die "Unable to mkdir .ssh"
 echo "ssh-dss $pubkey" >> .ssh/authorized_keys || clean_up_and_die "Unable to 
set up authorized_keys"
+
+# remove duplicate lines
+awk '!x[$0]++' .ssh/authorized_keys > .ssh/authorized_keys.tmp
+mv -f .ssh/authorized_keys{.tmp,}
+
 chmod 600 .ssh/authorized_keys  || clean_up_and_die "Unable to chmod 
authorized_keys"
 chown -R $username .ssh || clean_up_and_die "Unable to chown .ssh"
 
_______________________________________________
Server-devel mailing list
Server-devel@lists.laptop.org
http://lists.laptop.org/listinfo/server-devel

Reply via email to