Skip to content

Commit 663f94b

Browse files
Update remote_user_creation
1 parent 1d68aa5 commit 663f94b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

remote_user_creation

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ hostfile=`cat /tmp/hosts`
1010

1111

1212

13-
cat > /tmp/davi020 << END
13+
cat > /tmp/file.txt << END
1414
#!/bin/bash
1515
sudo useradd $usr -c "$cmnt" -u $uid -g $grp
1616
sudo mkdir /home/$usr/.ssh
@@ -29,7 +29,7 @@ ssh -o StrictHostKeyChecking=no -o ConnectTimeout=5 $i "ls" &> /dev/null
2929
if [[ $? -eq 0 ]];then
3030
echo "success in $i"
3131
scp /tmp/id_rsa.pub $i:/tmp
32-
ssh -o StrictHostKeyChecking=no -o ConnectTimeout=5 $i < /tmp/davi020
32+
ssh -o StrictHostKeyChecking=no -o ConnectTimeout=5 $i < /tmp/file.txt
3333
else
3434
echo "error in $i"
3535
fi

0 commit comments

Comments
 (0)