<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: HDFS usermod -G in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-usermod-G/m-p/23612#M4540</link>
    <description>Creating a user in Hue creates the user only in the Hue User database.&lt;BR /&gt;&lt;BR /&gt;Creating a user in Cloudera Manager create the user only the the Cloudera&lt;BR /&gt;Manager User table.&lt;BR /&gt;&lt;BR /&gt;Both the user and the groups need to exist on the NameNode host operating&lt;BR /&gt;system:&lt;BR /&gt;&lt;BR /&gt;sudo useradd Peter&lt;BR /&gt;sudo usermod -G developer Peter&lt;BR /&gt;&lt;BR /&gt;If you don't want the user to be able to log in to the NameNode:&lt;BR /&gt;&lt;BR /&gt;sudo usermod -s /bin/falso Peter&lt;BR /&gt;or&lt;BR /&gt;sudo usermod -s /usr/bin/nologin Peter&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 12 Jan 2015 22:04:50 GMT</pubDate>
    <dc:creator>denloe</dc:creator>
    <dc:date>2015-01-12T22:04:50Z</dc:date>
    <item>
      <title>HDFS usermod -G</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-usermod-G/m-p/23515#M4535</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I &amp;nbsp;want to do a folder that can be accessed in r, w,x by all the users of the group 'developer' that I created. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I also want that all the folders/files created by these users in this folder can be accessed in r,w,x by the users from this group.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;All the other users should access the folder in r and x.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;What should I do?&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I tried:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- to create my folder with these rights:&amp;nbsp;&lt;STRONG&gt;drwxrwxr-t+ &amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- the folder that I created is owned by &lt;STRONG&gt;admin &lt;/STRONG&gt;who is part of the developer group.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All I think is missing is to add the default group of my users the developer group : do something like&lt;/P&gt;&lt;PRE&gt;hadoop def -usermod -G developer Peter&lt;/PRE&gt;&lt;P&gt;But this is not working!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 09:18:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-usermod-G/m-p/23515#M4535</guid>
      <dc:creator>AlinaGHERMAN</dc:creator>
      <dc:date>2022-09-16T09:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: HDFS usermod -G</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-usermod-G/m-p/23528#M4537</link>
      <description>To begin with, my explanation will cover the case that you are using simple&lt;BR /&gt;authentication and the default Hadoop group mappings.&lt;BR /&gt;&lt;BR /&gt;Hadoop does not use uid or gid.&lt;BR /&gt;&lt;BR /&gt;You username on the system is passed to the namenode when you make a client&lt;BR /&gt;call.&lt;BR /&gt;&lt;BR /&gt;hadoop fs -ls /&lt;BR /&gt;&lt;BR /&gt;If your username is 'bob', the NameNode will receive the string "bob" to&lt;BR /&gt;identify you.&lt;BR /&gt;If your username is 'hdfs', the NameNode will receive the string "hdfs" to&lt;BR /&gt;identify you.&lt;BR /&gt;&lt;BR /&gt;User and Group lookups are done by the NameNode.&lt;BR /&gt;&lt;BR /&gt;The default for the property hadoop.security.group.mapping&lt;BR /&gt;is ￼org.apache.hadoop.security.ShellBasedUnixGroupsMapping, which means a&lt;BR /&gt;username passed with an HDFS client API will do the equivalent of "id -Gn&lt;BR /&gt;" on the NameNode host.&lt;BR /&gt;&lt;BR /&gt;On the host running the NameNode, use the standard unix commands to assign&lt;BR /&gt;users to groups.&lt;BR /&gt;&lt;BR /&gt;$ sudo usermod -G developer Peter&lt;BR /&gt;&lt;BR /&gt;You only need to define the group membership on the NameNode's host&lt;BR /&gt;operating system. Now if a user named 'Peter' exists on any other system&lt;BR /&gt;configured as an HDFS client, they will still be considered part of the&lt;BR /&gt;"developer" group by HDFS.&lt;BR /&gt;&lt;BR /&gt;"hdfs groups " is a handy command you can run to see if a user&lt;BR /&gt;belongs to a group in HDFS&lt;BR /&gt;&lt;BR /&gt;Create your directory in HDFS:&lt;BR /&gt;&lt;BR /&gt;hadoop fs -mkdir /projects/only/developers&lt;BR /&gt;hadoop fs -chown anyuser:developers /projects/only/developers&lt;BR /&gt;hadoop fs -chmod 775 /projects/only/developers&lt;BR /&gt;&lt;BR /&gt;Your directory is now writable by anyone in the group "developers" as&lt;BR /&gt;defined on the NameNode.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 09 Jan 2015 23:08:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-usermod-G/m-p/23528#M4537</guid>
      <dc:creator>denloe</dc:creator>
      <dc:date>2015-01-09T23:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: HDFS usermod -G</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-usermod-G/m-p/23569#M4536</link>
      <description>Adding onto David's reply, your end-goal for checking if HDFS understands your group setups, should be to have the command "hdfs groups &amp;lt;username&amp;gt;" return a satisfactory result.&lt;BR /&gt;&lt;BR /&gt;Also checkout this blog post: &lt;A target="_blank" href="http://blog.cloudera.com/blog/2012/03/authorization-and-authentication-in-hadoop/,"&gt;http://blog.cloudera.com/blog/2012/03/authorization-and-authentication-in-hadoop/,&lt;/A&gt; and the general HDFS permissions guide: &lt;A target="_blank" href="http://archive.cloudera.com/cdh5/cdh/5/hadoop/hadoop-project-dist/hadoop-hdfs/HdfsPermissionsGuide.html"&gt;http://archive.cloudera.com/cdh5/cdh/5/hadoop/hadoop-project-dist/hadoop-hdfs/HdfsPermissionsGuide.html&lt;/A&gt; for more reading on the topic.</description>
      <pubDate>Sun, 11 Jan 2015 06:17:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-usermod-G/m-p/23569#M4536</guid>
      <dc:creator>Harsh J</dc:creator>
      <dc:date>2015-01-11T06:17:23Z</dc:date>
    </item>
    <item>
      <title>Re: HDFS usermod -G</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-usermod-G/m-p/23578#M4538</link>
      <description>&lt;P&gt;Thank you david for this complete answer!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, I'm facing some problems...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On my namenode, when I do&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;sudo usermod -G developer Peter&lt;/PRE&gt;&lt;P&gt;I get user 'Peter' does not exist. (Note, I created this user with the Hue interface)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;When I do&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;hdfs groups Peter&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I get no group. To be precise I get&lt;/P&gt;&lt;PRE&gt;Peter:&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I checked that&amp;nbsp;the&amp;nbsp;&lt;SPAN&gt;property &lt;STRONG&gt;hadoop.security.group.mapping&lt;/STRONG&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;is ￼&lt;STRONG&gt;org.apache.hadoop.security.ShellBasedUnixGroupsMa&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;pping&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt; I created the user, the group and associated the group to the user in Hue interface. And these users, and groups do not seem to be visible on the OS (CentOS).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jan 2015 08:29:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-usermod-G/m-p/23578#M4538</guid>
      <dc:creator>AlinaGHERMAN</dc:creator>
      <dc:date>2015-01-12T08:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: HDFS usermod -G</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-usermod-G/m-p/23579#M4539</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Note:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;- I tried the command&lt;/P&gt;&lt;PRE&gt;sudo usermod -G developer Peter&lt;/PRE&gt;&lt;P&gt;on all instances of the cluster =&amp;gt; no result&lt;/P&gt;&lt;P&gt;- I tried to do the same thing on a quickstart VM and I managed to make it work by only using the interface.&amp;nbsp;I still not manage to make it work on the 7 machine cluster.&lt;/P&gt;&lt;P&gt;- When we installed the cluster, we had to create a user in cloudera manager and then create them again in cloudera director. is this normal? can this be linked to my problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jan 2015 09:05:48 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-usermod-G/m-p/23579#M4539</guid>
      <dc:creator>AlinaGHERMAN</dc:creator>
      <dc:date>2015-01-12T09:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: HDFS usermod -G</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-usermod-G/m-p/23612#M4540</link>
      <description>Creating a user in Hue creates the user only in the Hue User database.&lt;BR /&gt;&lt;BR /&gt;Creating a user in Cloudera Manager create the user only the the Cloudera&lt;BR /&gt;Manager User table.&lt;BR /&gt;&lt;BR /&gt;Both the user and the groups need to exist on the NameNode host operating&lt;BR /&gt;system:&lt;BR /&gt;&lt;BR /&gt;sudo useradd Peter&lt;BR /&gt;sudo usermod -G developer Peter&lt;BR /&gt;&lt;BR /&gt;If you don't want the user to be able to log in to the NameNode:&lt;BR /&gt;&lt;BR /&gt;sudo usermod -s /bin/falso Peter&lt;BR /&gt;or&lt;BR /&gt;sudo usermod -s /usr/bin/nologin Peter&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 12 Jan 2015 22:04:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/HDFS-usermod-G/m-p/23612#M4540</guid>
      <dc:creator>denloe</dc:creator>
      <dc:date>2015-01-12T22:04:50Z</dc:date>
    </item>
  </channel>
</rss>

