From 0d6fb2ac8ab681b2c59cb36bebbe9472383c199c Mon Sep 17 00:00:00 2001 From: "jeremy.thomas" Date: Thu, 20 Mar 2025 14:55:47 +0100 Subject: [PATCH] Ajout --- sisr1/tp04_scripts_admin/deployUsers.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 sisr1/tp04_scripts_admin/deployUsers.sh diff --git a/sisr1/tp04_scripts_admin/deployUsers.sh b/sisr1/tp04_scripts_admin/deployUsers.sh new file mode 100644 index 0000000..e584f43 --- /dev/null +++ b/sisr1/tp04_scripts_admin/deployUsers.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +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 +EOF +ssh root@$ip "rm -R $workdir" \ No newline at end of file