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/04/07 09:21:41 UTC

[jira] [Updated] (RANGER-1398) Missing the settings for 'ranger.usersync.unix.minGroupId' in ranger usersync module

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

Qiang Zhang updated RANGER-1398:
--------------------------------
    Description: 
I checked the codes and found below codes will get 'minimumGroupId' from 'ranger-ugsync-site.xml', but I can't find this parameter in this file after execute the shell script.
UnixUserGroupBuilder.java
public UnixUserGroupBuilder() {
        minimumUserId = Integer.parseInt(config.getMinUserId());
        minimumGroupId = Integer.parseInt(config.getMinGroupId());
      ......
}
UserGroupSyncConfig.java
public static final String  UGSYNC_MIN_GROUPID_PROP =   "ranger.usersync.unix.minGroupId";
public static final String  DEFAULT_UGSYNC_MIN_GROUPID =   "0";
public String getMinGroupId() {
        String mgid = prop.getProperty(UGSYNC_MIN_GROUPID_PROP);
        if (mgid == null) {
            mgid = DEFAULT_UGSYNC_MIN_GROUPID;
        }
        return mgid;
}
I have changed the codes and we can set the value in 'ranger-ugsync-site.xml'. The reason why I default it as '500' is the values between 0 and 499 are typically reserved for 
system accounts. You can refer to below url:
http://www.archivum.info/debian-bugs-closed@lists.debian.org/2006-03/03888/Bug-333706-marked-as-done-(useradd-lacks-r-option).html

  was:
I checked the codes and found we will get 'minimumGroupId' from ranger-ugsync-site.xml, but I can't find this parameter in this file after execute the shell script.
The reason why I set the value for 'ranger.usersync.unix.minGroupId' as 500:
The value must be non-negative. The default is to use the  smallest ID value greater than 500 and greater than every other group. Values between 0 and 499 are typically reserved for system accounts.


> Missing the settings for 'ranger.usersync.unix.minGroupId' in ranger usersync module
> ------------------------------------------------------------------------------------
>
>                 Key: RANGER-1398
>                 URL: https://issues.apache.org/jira/browse/RANGER-1398
>             Project: Ranger
>          Issue Type: Bug
>          Components: usersync
>    Affects Versions: 0.7.0
>            Reporter: Qiang Zhang
>            Assignee: Qiang Zhang
>             Fix For: 0.7.1
>
>         Attachments: 0001-RANGER-1398-Missing-the-settings-for-ranger.usersync.patch
>
>
> I checked the codes and found below codes will get 'minimumGroupId' from 'ranger-ugsync-site.xml', but I can't find this parameter in this file after execute the shell script.
> UnixUserGroupBuilder.java
> public UnixUserGroupBuilder() {
>         minimumUserId = Integer.parseInt(config.getMinUserId());
>         minimumGroupId = Integer.parseInt(config.getMinGroupId());
>       ......
> }
> UserGroupSyncConfig.java
> public static final String  UGSYNC_MIN_GROUPID_PROP =   "ranger.usersync.unix.minGroupId";
> public static final String  DEFAULT_UGSYNC_MIN_GROUPID =   "0";
> public String getMinGroupId() {
>         String mgid = prop.getProperty(UGSYNC_MIN_GROUPID_PROP);
>         if (mgid == null) {
>             mgid = DEFAULT_UGSYNC_MIN_GROUPID;
>         }
>         return mgid;
> }
> I have changed the codes and we can set the value in 'ranger-ugsync-site.xml'. The reason why I default it as '500' is the values between 0 and 499 are typically reserved for 
> system accounts. You can refer to below url:
> http://www.archivum.info/debian-bugs-closed@lists.debian.org/2006-03/03888/Bug-333706-marked-as-done-(useradd-lacks-r-option).html



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