Check if user is on univ-rennes1 network.
This commit is contained in:
parent
3cc032e857
commit
b7733bae9d
|
@ -10,6 +10,13 @@ case $lang in
|
||||||
*) group_name="Backup Operators" ;;
|
*) group_name="Backup Operators" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
ip_ur1=$(wget http://checkip.dyndns.org/ -O - -o /dev/null | cut -d" " -f 6 | cut -d\< -f 1 | cut -d'.' -f1-2)
|
||||||
|
|
||||||
|
if [[ ${ip_ur1} != "129.20" ]]; then
|
||||||
|
printf "Merci de vous connecter au réseau 'univ-rennes1' et relancer le 01_install_backuppc.exe\n"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
net user backuppc $(openssl rand -base64 8) /add # Creation compte backuppc (mot de passe aleatoire)
|
net user backuppc $(openssl rand -base64 8) /add # Creation compte backuppc (mot de passe aleatoire)
|
||||||
#net localgroup "Administrateurs" backuppc /add # Ajout des droits admin a backuppc
|
#net localgroup "Administrateurs" backuppc /add # Ajout des droits admin a backuppc
|
||||||
net localgroup "$group_name" backuppc /add
|
net localgroup "$group_name" backuppc /add
|
||||||
|
|
Loading…
Reference in New Issue