You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by pengjianhua <pe...@zte.com.cn> on 2017/04/14 12:42:19 UTC
Review Request 58455: Run updatepolicymgrpassword.sh and
updatepolicymgrpassword.py to update policy mgr password failed.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58455/
-----------------------------------------------------------
Review request for ranger, Alok Lal, Ankita Sinha, Don Bosco Durai, Colm O hEigeartaigh, Gautam Borad, Madhan Neethiraj, Ramesh Mani, Selvamohan Neethiraj, Velmurugan Periasamy, and Qiang Zhang.
Bugs: RANGER-1515
https://issues.apache.org/jira/browse/RANGER-1515
Repository: ranger
Description
-------
The "chown: invalid user: \u2018ranger:ranger\u2019" would appear when run updatepolicymgrpassword.sh and updatepolicymgrpassword.py to update policy mgr password. Test steps is following:
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 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)
Diffs
-----
unixauthservice/scripts/updatepolicymgrpassword.py 92c4805
unixauthservice/scripts/updatepolicymgrpassword.sh a13c030
Diff: https://reviews.apache.org/r/58455/diff/1/
Testing
-------
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.
Thanks,
pengjianhua
Re: Review Request 58455: Run updatepolicymgrpassword.sh and
updatepolicymgrpassword.py to update policy mgr password failed.
Posted by Qiang Zhang <zh...@zte.com.cn>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58455/#review172057
-----------------------------------------------------------
Ship it!
Ship It!
- Qiang Zhang
On April 14, 2017, 12:42 p.m., pengjianhua wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58455/
> -----------------------------------------------------------
>
> (Updated April 14, 2017, 12:42 p.m.)
>
>
> Review request for ranger, Alok Lal, Ankita Sinha, Don Bosco Durai, Colm O hEigeartaigh, Gautam Borad, Madhan Neethiraj, Ramesh Mani, Selvamohan Neethiraj, Velmurugan Periasamy, and Qiang Zhang.
>
>
> Bugs: RANGER-1515
> https://issues.apache.org/jira/browse/RANGER-1515
>
>
> Repository: ranger
>
>
> Description
> -------
>
> The "chown: invalid user: \u2018ranger:ranger\u2019" would appear when run updatepolicymgrpassword.sh and updatepolicymgrpassword.py to update policy mgr password. Test steps is following:
> 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 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)
>
>
> Diffs
> -----
>
> unixauthservice/scripts/updatepolicymgrpassword.py 92c4805
> unixauthservice/scripts/updatepolicymgrpassword.sh a13c030
>
>
> Diff: https://reviews.apache.org/r/58455/diff/1/
>
>
> Testing
> -------
>
> 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.
>
>
> Thanks,
>
> pengjianhua
>
>