Ajout ACL pour la connexion OpenID Connect via ainur
This commit is contained in:
parent
b5c65548d5
commit
f660d4731e
@ -53,6 +53,11 @@ while read -r username; do
|
|||||||
MAC_ADDRESS=$(grep -Po 'net\d+: virtio=\K[^,]+' /etc/pve/qemu-server/$NEXT_VM_ID.conf)
|
MAC_ADDRESS=$(grep -Po 'net\d+: virtio=\K[^,]+' /etc/pve/qemu-server/$NEXT_VM_ID.conf)
|
||||||
mariadb --host=gimli.iut-fbleau.fr --user=proxmox --password="..." -e "CALL add_vm('$MAC_ADDRESS', 'vm-$username')" kea
|
mariadb --host=gimli.iut-fbleau.fr --user=proxmox --password="..." -e "CALL add_vm('$MAC_ADDRESS', 'vm-$username')" kea
|
||||||
|
|
||||||
|
if ! grep -q "^user:$username@ainur.iut-fbleau.fr" /etc/pve/user.cfg; then
|
||||||
|
pveum user add "$username@ainur.iut-fbleau.fr"
|
||||||
|
fi
|
||||||
|
|
||||||
pvesh set /access/acl --path /vms/$NEXT_VM_ID --roles etu --users "$username@arda.lan"
|
pvesh set /access/acl --path /vms/$NEXT_VM_ID --roles etu --users "$username@arda.lan"
|
||||||
|
pvesh set /access/acl --path /vms/$NEXT_VM_ID --roles etu --users "$username@ainur.iut-fbleau.fr"
|
||||||
((NEXT_VM_ID++))
|
((NEXT_VM_ID++))
|
||||||
done < "$INPUT_FILE"
|
done < "$INPUT_FILE"
|
||||||
|
Loading…
Reference in New Issue
Block a user