You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "Qiang Zhang (JIRA)" <ji...@apache.org> on 2017/02/10 10:13:41 UTC

[jira] [Updated] (RANGER-1373) The "chown: invalid user: ‘ranger:ranger’" would appear when I run updatepolicymgrpassword.sh and updatepolicymgrpassword.py to update policy mgr password. So changing directory attributes failed

     [ https://issues.apache.org/jira/browse/RANGER-1373?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Qiang Zhang updated RANGER-1373:
--------------------------------
    Request participants:   (was: )
                 Summary: The "chown: invalid user: ‘ranger:ranger’" would appear when I run updatepolicymgrpassword.sh and updatepolicymgrpassword.py to update policy mgr password. So changing directory attributes failed  (was: The "chown: invalid user: ‘ranger:ranger’" would appear when I run updatepolicymgrpassword.sh and updatepolicymgrpassword.py to update policy mgr password.)

> The "chown: invalid user: ‘ranger:ranger’" would appear when I run updatepolicymgrpassword.sh and updatepolicymgrpassword.py to update policy mgr password. So changing directory attributes failed
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: RANGER-1373
>                 URL: https://issues.apache.org/jira/browse/RANGER-1373
>             Project: Ranger
>          Issue Type: Bug
>          Components: usersync
>    Affects Versions: 0.7.0
>            Reporter: Qiang Zhang
>            Assignee: Qiang Zhang
>              Labels: patch
>         Attachments: 0001-RANGER-1373-The-chown-invalid-user-ranger-ranger-wou.patch
>
>
> Test steps
> 1. Using following configuration to install the Ranger UserSync Process in install.properties.
> unix_user=usersync
> unix_group=usersync
> 2. Running updatepolicymgrpassword.sh. or updatepolicymgrpassword.py to update policy mgr password.
> The cause of the error is as follows:
> The linux user processing logic of the installer for the Ranger UserSync Process, updatepolicymgrpassword.sh and updatepolicymgrpassword.py is inconsistent. The installer for the Ranger UserSync Process use configuration parameters to create linux user. However updatepolicymgrpassword.sh and updatepolicymgrpassword.py use hard code get linux user. In above test steps the usersync user and usersync group was created when installing the Ranger UserSync Process. ranger user and ranger group don't exist. In chown ${unix_user}:${unix_group} `dirname "${SYNC_LDAP_BIND_KEYSTOREPATH}"` the updatepolicymgrpassword.sh used ranger user and ranger group. The  updatepolicymgrpassword.sh code is as following:
> unix_user=ranger
> unix_group=ranger
> chown ${unix_user}:${unix_group} `dirname "${SYNC_LDAP_BIND_KEYSTOREPATH}"`.
> The installer for the Ranger UserSync Process code is as following:
> unix_user = globalDict['unix_user']
> ownerName = mergeProps[unixUserProp]
> groupName = mergeProps[unixGroupProp]
> ownerId = createUser(ownerName, groupName)
> We should also get linux user and group from configuration file in updatepolicymgrpassword.sh and updatepolicymgrpassword.py.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)