[
https://issues.apache.org/jira/browse/AMBARI-18722?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Laszlo Puskas resolved AMBARI-18722.
------------------------------------
Resolution: Duplicate
The post user creation hook implementation has been committed by the linked
issue.
> Post-user-creation script hook
> ------------------------------
>
> Key: AMBARI-18722
> URL: https://issues.apache.org/jira/browse/AMBARI-18722
> Project: Ambari
> Issue Type: Improvement
> Components: ambari-server
> Reporter: Paul Codding
> Assignee: Laszlo Puskas
> Fix For: 2.5.0
>
>
> 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:
> {noformat}
> INFO: Executing /var/lib/ambari-server/resources/post-user-create.sh with
> arguments ['paul', 'users,operations'] succeeded
> {noformat}
> {noformat}
> ERROR: Executing /var/lib/ambari-server/resources/post-user-create.sh with
> arguments ['paul', 'users,operations'] failed with exit code 1 {"stdout":
> ''","stderr":"User hdfs not found"}
> {noformat}
> 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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)