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
This commit is contained in:
parent
a185867673
commit
d3d3dc4597
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user