From d3d3dc45976d8abd3ca072c206267e796a68dec6 Mon Sep 17 00:00:00 2001 From: lissav Date: Wed, 9 Sep 2009 14:44:42 +0000 Subject: [PATCH] fix grep of /etc/password for home diretory in copy.sh build, to only match on root id not other ids starting with root git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4110 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Utils.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/perl-xCAT/xCAT/Utils.pm b/perl-xCAT/xCAT/Utils.pm index 5d1741616..d8a6a7fb1 100644 --- a/perl-xCAT/xCAT/Utils.pm +++ b/perl-xCAT/xCAT/Utils.pm @@ -1334,7 +1334,7 @@ sub setupSSH or die "cannot open file $home/.ssh/copy.sh\n"; print FILE "#!/bin/sh umask 0077 -home=`egrep \"^$to_userid\" /etc/passwd | cut -f6 -d :` +home=`egrep \"^$to_userid:\" /etc/passwd | cut -f6 -d :` dest_dir=\"\$home/.ssh\" mkdir -p \$dest_dir cat /tmp/$to_userid/.ssh/authorized_keys >> \$home/.ssh/authorized_keys 2>&1