suite des tp
This commit is contained in:
parent
b0a7d61dca
commit
34a518f221
16
sisr1/tp04-scripts-admin/deployUsers.sh
Normal file
16
sisr1/tp04-scripts-admin/deployUsers.sh
Normal file
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
ip=$1
|
||||
workdir=/root/deploy
|
||||
user=root
|
||||
|
||||
ssh $user@$ip "mkdir $workdir" 2> /dev/null
|
||||
|
||||
scp createGroups.sh $user@$ip:$workdir
|
||||
scp logins.csv $user@$ip:$workdir
|
||||
scp createUsers.sh $user@$ip:$workdir
|
||||
scp Users.csv $user@$ip:$workdir
|
||||
|
||||
ssh $user@$ip "cd $workdir ; bash createGroups.sh ; bash createUsers.sh"
|
||||
|
||||
ssh $user@$ip "rm -R $workdir"
|
Loading…
x
Reference in New Issue
Block a user