When users are created in the Ambari DB, either through manual user creation in the UI, or automated creation through LDAP sync, many users have different needs for initializing those users. The most common is creating /user/<username> HDFS home directories for each user. Since the exact initialization steps vary from customer to customer, the idea would be to have a single script in /var/lib/ambari-server/resources that can be executed for each user that is created.
This feature would be disabled by default, and will be only configured via properties in /etc/ambari-server/conf/ambari.properties. There would be two properties, an on/off, and a property that has the path of the script to execute for each user.
The Ambari Server would execute this script whenever a user is created, and it would log a message for each invocation:
Both the username and the list of groups the user is in would be past as $1, and $2 to the script. If the script has a non-zero exit code an ERROR is logged, otherwise an INFO level log is created with the script path and params.