Script
This commit is contained in:
parent
97c1eaba8b
commit
31b3da2bb3
12
sisr1/tp04_scripts_admin/tp04/deployUsers.sh
Normal file
12
sisr1/tp04_scripts_admin/tp04/deployUsers.sh
Normal file
@ -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
|
Loading…
x
Reference in New Issue
Block a user