Skip to content

Instantly share code, notes, and snippets.

@sarahhodne
Created September 12, 2010 02:28
Show Gist options
  • Save sarahhodne/575774 to your computer and use it in GitHub Desktop.
Save sarahhodne/575774 to your computer and use it in GitHub Desktop.
#!/bin/sh
HOSTNAME=$(hostname)
SERVICE=$1
/usr/bin/ldapmodify <<LDIF
dn: cn=${HOSTNAME}.cluenet.org,ou=servers,dc=cluenet,dc=org
changeType: modify
add: authorizedService
authorizedService: ${SERVICE}
dn: cn=${SERVICE},cn=svcAccess,cn=${HOSTNAME}.cluenet.org,ou=servers,dc=cluenet,dc=org
changeType: add
objectClass: groupOfNames
cn: ${SERVICE}
member: uid=dvyjones,ou=people,dc=cluenet,dc=org
LDIF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment