Description
adding group hrt_yarn_rmadmin_test
sudo su - -c "groupadd hrt_yarn_rmadmin_test" root
adding user hrt_yarn_rmadmin_test to group hrt_yarn_rmadmin_test
sudo su - -c "useradd hrt_yarn_rmadmin_test -g hrt_yarn_rmadmin_test" root
adding group hrt_yarn_rmadmin_test_group2
sudo su - -c "groupadd hrt_yarn_rmadmin_test_group2" root
adding user hrt_yarn_rmadmin_test to group hrt_yarn_rmadmin_test_group2
sudo su - -c "usermod -a -G hrt_yarn_rmadmin_test_group2 hrt_yarn_rmadmin_test" root
Refresh and getGroups
yarn rmadmin -refreshUserToGroupsMappings /usr/hdp/current/hadoop-yarn-client/bin/yarn rmadmin -getGroups hrt_yarn_rmadmin_test hrt_yarn_rmadmin_test : hrt_yarn_rmadmin_test hrt_yarn_rmadmin_test_group2
Delete group hrt_yarn_rmadmin_test_group2 from user hrt_yarn_rmadmin_test and refresh and do getGroups.
We can still see group hrt_yarn_rmadmin_test_group2
sudo su - -c "gpasswd -d hrt_yarn_rmadmin_test hrt_yarn_rmadmin_test_group2" root
Removing user hrt_yarn_rmadmin_test from group hrt_yarn_rmadmin_test_group2
bash-4.2$ /usr/hdp/current/hadoop-yarn-client/bin/yarn rmadmin -refreshUserToGroupsMappings /usr/hdp/current/hadoop-yarn-client/bin/yarn rmadmin -getGroups hrt_yarn_rmadmin_test hrt_yarn_rmadmin_test : hrt_yarn_rmadmin_test hrt_yarn_rmadmin_test_group2