This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Requires Bash version 4+ because it uses dictionaries/arrays | |
# Define the 2 project IDs | |
# I assume the same user has access to both projects | |
OLD_PROJECT=INSERT_OLD_PROJECT_ID; | |
NEW_PROJECT=INSERT_NEW_PROJECT_ID; | |
# Maintain a dictionary of volume IDs to VM names so that we can attach to the correct VM later | |
# Detach the non-boot volumes from the VMs in the old project and transfer them to the new project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create the service | |
ipa service-add 'radius/radiusserver.example.com' | |
ipa service-add-host --hosts=radiusserver.example.com radius/radiusserver.example.com | |
# You need the role and permissions | |
ipa role-add "samba/radius auth" | |
ipa privilege-add "NTLM Password Hash Access" | |
ipa permission-add "Read Samba NTLM RC4 Password Hash attribute" --attrs=ipaNTHash --attrs=sambaNTPassword --attrs=sambaPwdLastSet --attrs=sambaSID --attrs=sambaAcctFlags --attrs=sambaDomainName --type=user --right=read --right=compare | |
ipa privilege-add-permission "NTLM Password Hash Access" --permissions="Read Samba NTLM RC4 Password Hash attribute" |