From 31b3da2bb3bcf82621480dad8d6b74ce5451a282 Mon Sep 17 00:00:00 2001 From: "yann.lereuille" Date: Thu, 20 Mar 2025 14:58:01 +0100 Subject: [PATCH] Script --- sisr1/tp04_scripts_admin/tp04/deployUsers.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 sisr1/tp04_scripts_admin/tp04/deployUsers.sh diff --git a/sisr1/tp04_scripts_admin/tp04/deployUsers.sh b/sisr1/tp04_scripts_admin/tp04/deployUsers.sh new file mode 100644 index 0000000..249a6ff --- /dev/null +++ b/sisr1/tp04_scripts_admin/tp04/deployUsers.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +# Ip passée en paramètre +ip=$1 +workdir=/root/deploy +ssh root@$ip "mkdir $workdir" 2> /dev/null +scp "./createGroups.sh" "./logins.csv" "createUsers.sh" root@$ip:$workdir +ssh root@$ip >> EOF + bash createGroups.sh + bash createUsers.sh + rm -R $workdir +EOF \ No newline at end of file