Skip to content

Instantly share code, notes, and snippets.

@realduke2000
Last active September 22, 2016 09:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save realduke2000/7ea60df527e55533b377f06dcb346bd7 to your computer and use it in GitHub Desktop.
Save realduke2000/7ea60df527e55533b377f06dcb346bd7 to your computer and use it in GitHub Desktop.
#query scripts in rpm file
rpm -qp --scripts xxx.rpm
#extact files in .rpm file
rpm2cpio myrpmfile.rpm | cpio -idmv
# delete user from ldap
nbur420-332vm1:~ # ldapdelete -v -x -D "cn=admin mgr 01,dc=nbur 420 332 vm1,dc=engba,dc=xxx,dc=com" -w P@ssw0rd "uid=u5_asesxb9k16-vm544,ou=people,dc=nbur 420 332 vm1,dc=engba,dc=xxx,dc=com"
ldap_initialize( <DEFAULT> )
deleting entry "uid=u5_asesxb9k16-vm544,ou=people,dc=nbur 420 332 vm1,dc=engba,dc=xxx,dc=com"
nbur420-332vm1:~ # ldapadd -x -D "cn=admin mgr 01,dc=nbur 420 332 vm1,dc=engba,dc=xxx,dc=com" -w P@ssw0rd -f /root/u5_asesxb9k16-vm544.ldif
adding new entry "uid=u5_asesxb9k16-vm544,ou=people,dc=nbur 420 332 vm1,dc=engba,dc=xxx,dc=com"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment