Skip to content

Instantly share code, notes, and snippets.

View thisismsreddy's full-sized avatar

thisismsreddy

  • enthsquare
  • India
View GitHub Profile
@nazunalika
nazunalika / gist:245f0f3c174a9ae129078567b0d645f6
Last active May 22, 2023 07:47
FreeIPA + FreeRADIUS Permissions
# 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"
@SMAK1993
SMAK1993 / o7k-volume-and-instance-migration.sh
Last active March 23, 2023 16:48
Script for transferring VMs from one Openstack project to another
#!/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