You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Yu Gao (JIRA)" <ji...@apache.org> on 2013/11/08 20:52:17 UTC

[jira] [Commented] (HADOOP-10087) UserGroupInformation.getGroupNames() fails to return primary group first when JniBasedUnixGroupsMappingWithFallback is used

    [ https://issues.apache.org/jira/browse/HADOOP-10087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13817624#comment-13817624 ] 

Yu Gao commented on HADOOP-10087:
---------------------------------

I have a user hdadmin on my machine, with hdadmin as its primary group and shadow as its supplementary group. The API UserGroupInformation.getGroupNames() should return hdadmin group first since it's primary, but I got following different result when I ran org.apache.hadoop.security.UserGroupInformation.main():
Getting UGI for current user
13/10/30 15:22:23 DEBUG security.Groups:  Creating new Groups object
13/10/30 15:22:23 DEBUG util.NativeCodeLoader: Trying to load the custom-built native-hadoop library...
13/10/30 15:22:23 DEBUG util.NativeCodeLoader: Loaded the native-hadoop library
13/10/30 15:22:23 DEBUG security.JniBasedUnixGroupsMapping: Using JniBasedUnixGroupsMapping for Group resolution
13/10/30 15:22:23 DEBUG security.JniBasedUnixGroupsMappingWithFallback: Group mapping impl=org.apache.hadoop.security.JniBasedUnixGroupsMapping
13/10/30 15:22:24 DEBUG security.Groups: Group mapping impl=org.apache.hadoop.security.JniBasedUnixGroupsMappingWithFallback; cacheTimeout=300000
13/10/30 15:22:24 DEBUG security.UserGroupInformation: hadoop login
13/10/30 15:22:24 DEBUG security.UserGroupInformation: hadoop login commit
13/10/30 15:22:24 DEBUG security.UserGroupInformation: using local user:UsernamePrincipal: hdadmin
13/10/30 15:22:24 DEBUG security.UserGroupInformation: UGI loginUser:hdadmin (auth:SIMPLE)
User: hdadmin
Group Ids:
13/10/30 15:22:24 DEBUG security.Groups: Returning fetched groups for 'hdadmin'
Groups: shadow hdadmin
UGI: hdadmin (auth:SIMPLE)
Auth method SIMPLE
Keytab false

> UserGroupInformation.getGroupNames() fails to return primary group first when JniBasedUnixGroupsMappingWithFallback is used
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-10087
>                 URL: https://issues.apache.org/jira/browse/HADOOP-10087
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: security
>    Affects Versions: 2.1.0-beta, 2.2.0
>         Environment: SUSE Linux Enterprise Server 11 (x86_64)
>            Reporter: Yu Gao
>              Labels: security
>
> When JniBasedUnixGroupsMappingWithFallback is used as the group mapping resolution provider, UserGroupInformation.getGroupNames() fails to return the primary group first in the list as documented.



--
This message was sent by Atlassian JIRA
(v6.1#6144)