Hi, i am trying to make callback which will make API calls to external system
when new user created.
So i puts the script to "/usr/lib/python2.7/site-packages/ipaserver/plugins",
give execute priveleges to file and restart freeipa server.
Greating new user in GUI - so folder is not creating.
In my script i just programmed simple action - creation of folder.
Script:
import os
from ipalib.plugins.user import user_add
from ipalib import api, plugable
def verify_shell_cb(self, ldap, dn, entry_attrs, *keys, **options):
folder_path = '/home/freeipa/suka'
if not os.path.exists(folder_path):
os.makedirs(folder_path)
user_add.register_post_callback(verify_shell_cb)
api.register(user_add)
--
_______________________________________________
FreeIPA-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedorahosted.org/archives/list/[email protected]
Do not reply to spam, report it:
https://pagure.io/fedora-infrastructure/new_issue
[Freeipa-users] Creating user_add callback
Anton PalkoBrosov via FreeIPA-users Thu, 25 Jul 2024 04:27:56 -0700
- [Freeipa-users] Creating user_add call... Anton PalkoBrosov via FreeIPA-users
- [Freeipa-users] Re: Creating user... Rob Crittenden via FreeIPA-users
- [Freeipa-users] Re: Creating ... Anton PalkoBrosov via FreeIPA-users
- [Freeipa-users] Re: Creat... Rob Crittenden via FreeIPA-users
- [Freeipa-users] Re: C... Anton PalkoBrosov via FreeIPA-users
- [Freeipa-users] ... Rob Crittenden via FreeIPA-users
