Creating Multiple Users in Hadoop Cluster

What happens if we share same user among multiple users?


If we share same hadoop user account among multiple users then we suffer from following problems
- Difficult to trace the jobs and track the tasks/defects done by each user
- Shared account arriase security issue.
- If all are given the same user account, all users will have the same privilege and all can
access everyone’s data, can modify it, can perform execution, can delete it also.

What are the benefits of creating multiple users?


  • The directories/files of one user cannot be modified by other user.
  • Other users cannot add new files to a user’s directory.
  • Other users cannot perform any tasks (mapreduce etc) on a user’s files.

Steps for setting up multiple User Accounts


[1] Create a New User

 Ubuntu: $ sudo  adduser  --ingroup   <groupname>   <username>
 Redhat: $ useradd  -g <groupname>   <username>
 All: $ passwd <username>


[2] Chanage permission of hadoop temp directory

Change the permission of a directory in HDFS where hadoop stores its temporary data.
Find that directory by looking entry hadoop.tmp.dir into core-site.xml
Then from the superuser account do the following step.

$ hadoop fs –chmod -R  1777 /path/to/hadoop/tmp/directory


[3] Give write access to hadoop temp directory in user machine

The next step is to give write permission to our user group on hadoop.tmp.dir. Open core-site.xml to get the path for hadoop.tmp.dir. This should be done only in the machine(node) where the new user is added.

$ chmod 777 /path/to/hadoop/tmp/dirctory


[4] Create user home directory in HDFS

The next step is to create a directory structure in HDFS for the new user.
For that from the superuser, create a directory structure.

$ hadoop  fs –mkdir /user/username/


[5] Change the ownership of user home directory in HDFS

The ownership of the newly created directory structure is with superuser.With this new user
will not be able to run mapreduce programs. So change the ownership of newly created directory in HDFS to the new user.

$ hadoop  fs –chown –R username:groupname   <directory to access in HDFS>

Eg: hadoop fs –chown –R username:groupname  /user/username/


[6] Now run jobs with new user

Login with new user and run jobs

$ su - newuser
$ bin/hadoop jar pathToJar.jar mainClass input/path output/path

92 comments

Thank for sharing this great Hadoop tutorials Blog post. I will use your command when upgrade hadoop.
Hadoop Training in hyderabad

hi guys,Thanks for your sharing i have to very useful for the your information.Thanks a lot.
Hadoop Training in Chennai

$ hadoop fs –chmod -R 1777 /path/to/hadoop/tmp/directory is not working for me. I am using apache hadoop 1.2.0.

I am getting the following.
[haas@ip-10-251-34-217 ~]$ hadoop fs -chmod -R 1777 /tmp/
chmod: chmod : mode '1777' does not match the expected pattern.

Please suggest me any idea. Thanks.

I don't think there was a Apache Hadoop version 1.2.0. So from where you took that hadoop.

Better to use hadoop release 0.20.* or above

This comment has been removed by the author.

Hi,
Thanks for nice information and best online trainers providing hadoop online training

This information which you provided is very much useful for us.It was very interesting and useful for hadoop online training.We also providing qa online training institute in USA.

It was really a nice article and I was really impressed by reading this article. We are also giving all software Course Online Training. The Hadoop Online Training is one of the leading Online Training institute in the world.

ya i had set the path initially. actually i created user called hduser and from that user i installed hadoop.now if i run the chmod command its showing “chmod: Unknown command
Usage: java FsShell ………….”
some syntax it will show and in last line its showing
“The general command line syntax is
bin/hadoop command [genericOptions] [commandOptions] ”
so i used the command bin/ hadoop fs –chmod -R 1777 /app/hadoop/tmp/
now is showing
bash: bin/hadoop: No such file or directory
what exactly wrong i did can u have any idea???
please help me

Hadoop Developer --- "
Big Data (Hadoop) Developer Online Training
Send ur Enquiry to contact@21cssindia.com
Understanding Big Data
Introduction/Installation - Hadoop Custom VM(Single Node)
Understanding Big Data
3V (Volume-Variety-Velocity) Characteristics
Structured and Unstructured Data
Application and use cases of Big Data" more… Online Training- Corporate Training- IT Support U Can Reach Us On +917386622889 - +919000444287 http://www.21cssindia.com/courses/hadoop-online-training-182.html

I see this content as a Unique and very informative article. Impressive article like this may help many like me in finding the best Hadoop Training in Chennai and there finding the best hadoop training institute in chennai

Thanks for sharing... Actually Hadoop is a highly growing & scoopful technology in IT market it’s an open-source software framework for managing big data in a distributed fashion on large commodity computing hardware. FITA provides Hadoop training in Chennai get in to fita and out with your career.

Nice article i was really impressed by seeing this article, it was very interesting and it is very useful for me.I get a lot of great information from this blog. Thank you for your sharing this informative blog.Hybris Training | Hybris Online Training

Thanks for your support, i am very interested in learning Hadoop.. If you want more details on HADOOP BIGDATA
just go through this link.....http://www.tekclasses.com/courses/hadoop/

Rajasthan Gram Panchayat 2252 Sathin Recruitment 2015-16

This is awesome blog with smart content, Nice to see your post. Thanks.....

Latest Govt JObs 2016


Very efficiently written post. It will be valuable to anybody who employees it, including myself. Keep up the good work...................

Thanks for sharing this information .You may also refer http://www.s4techno.com/hadoop-training-in-pune/

Freelance Best Makeup & Hair Artist in Jaipur with huge experience and Specialization in Bridal and Wedding Makeup,Celebrity Makeup,Professional Makeup,Creative Makeup,Bollywood Makeup and Character Makeup in Delhi,Jaipur,Rajasthan. Natural Makeup that allows your skin to breath with a radiant glow and remains flawless throughout your special day.


Best Makeup and Hairstyle in jaipur
Fiza Makeup Academy in jaipur
Best bridal makeup artist in jaipur(bollywood makeup,creative makeup,Airbrush makeup,character makeup)
Make up and Hair kit
Professional makeup artist course in jaipur
Makeup and hairstyle tips
Makeup and hair Images
Makeup and hair tutorials
Makeup and hair contract


Freelance Best Makeup & Hair Artist in Jaipur with huge experience and Specialization in Bridal and Wedding Makeup,Celebrity Makeup,Professional Makeup,Creative Makeup,Bollywood Makeup and Character Makeup in Delhi,Jaipur,Rajasthan. Natural Makeup that allows your skin to breath with a radiant glow and remains flawless throughout your special day.
Best makeup and hairstyle in jaipur
Fiza makeup academy in jaipur
Best bridal makeup artist in jaipur(bollywood makeup,creative makeup,Airbrush makeup,character makeup)
Make up and Hair kit
Professional makeup artist course in jaipur
Fiza Makeup and hairstyle tips
Fiza Makeup and hair Images
Fiza Makeup and hair tutorials
Fiza Makeup and hair contract

nice blog
great information.
VLCC Institute Advance Nail Art and Nail Extension Course provides finest level of learning in Nail art techniques like 3D Art,
Nail Piercing with Jwellery, Upper form with inbuilt design, Transfer foil designs and many more.
Nail Extension course will cover on demand techniques in Nail courses like French Nail Extension, Toe Nail Extension and Acrylic forms Nail Extension.

Your new valuable key points imply much a person like me and extremely more to my office workers. With thanks; from every one of us.
datascience training in chennai

Organic oil can improve complexion and skin tone.Beyond moisturizing your skin, almond oil is a great massage oil or skin treatment. It also has powerful antifungal properties.

Organic Cold Pressed Oils

This looks absolutely perfect. All these tiny details are made with lot of background knowledge. I like it a lot. 
python training in chennai | python training in bangalore

python online training | python training in pune

python training in chennai

Nice tutorial. Thanks for sharing the valuable information. it’s really helpful. Who want to learn this blog most helpful. Keep sharing on updated tutorials…
python training in chennai
python training in Bangalore

Thanks first of all for the useful info.
the idea in this article is quite different and innovative please update more.
android app development course in bangalore
Android Training in Nolambur
Android Training in Saidapet
Android Training in Perungudi

I believe there are many more pleasurable opportunities ahead for individuals that looked at your site.
industrial safety courses in chennai

Inspiring writings and I greatly admired what you have to say , I hope you continue to provide new ideas for us all and greetings success always for you..Keep update more information.

rpa training in chennai
rpa training in bangalore
rpa course in bangalore
best rpa training in bangalore
rpa online training

Good Post! Thank you so much for sharing this pretty post, it was so good to read and useful to improve my knowledge as updated one, keep blogging.

Best Devops Training in pune

Thanks for sharing this unique information with us. Your post is really awesome. Your blog is really helpful for me..
organic oil
organic oil in jaipur
organic cold pressed oils
ayurvedic oil store in jaipur

I ReGreat For Your Information The Information U have Shared Is Fabulous And Interesting So Please keep Updating Us The Information Shared Is Very Valuable Time Just Went On Reading The Article Python Online Course AWS Online Course Data Science Online Course Hadoop Online Course

I really enjoy simply reading all of your weblogs. Simply wanted to inform you that you have people like me who appreciate your work. Definitely a great post I would like to read this
devops online training

aws online training

data science with python online training

data science online training

rpa online training

Your good knowledge and kindness in playing with all the pieces were very useful. I don’t know what I would have done if I had not encountered such a step like this.
Microsoft Azure online training
Selenium online training
Java online training
uipath online training
Python online training

Your very own commitment to getting the message throughout came to be rather powerful and have consistently enabled employees just like me to arrive at their desired goals.
Data science Course Training in Chennai | Data Science Training in Chennai
RPA Course Training in Chennai | RPA Training in Chennai
AWS Course Training in Chennai | AWS Training in Chennai

I have to thank for sharing this blog admin, really helpful to me.

Guest posting sites
Education

Attend The Python training in bangalore From ExcelR. Practical Python training in bangalore Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Python training in bangalore.
python training in bangalore

Attend The Data Science Course From ExcelR. Practical Data Science Course Sessions With Assured Placement Support From Experienced Faculty. ExcelR Offers The Data Science Course.
Data Science Course

As we know, Big data platform managed service is the future of the industries these days, this article helps me to figure out which language I need to learn to pursue the future in this field.

Superb. I really enjoyed very much with this article here. Really it is an amazing article I had ever read. I hope it will help a lot for all. Thank you so much for this amazing posts and please keep update like this excellent article. thank you for sharing such a great blog with us.
DevOps Training | Certification in Chennai | DevOps Training | Certification in anna nagar | DevOps Training | Certification in omr | DevOps Training | Certification in porur | DevOps Training | Certification in tambaram | DevOps Training | Certification in velachery

I have completely read your post and the content is crisp and clear.Thank you for posting such an informative article, I have decided to follow your blog so that I can myself updated..
Salesforce Training in Chennai

Salesforce Online Training in Chennai

Salesforce Training in Bangalore

Salesforce Training in Hyderabad

Salesforce training in ameerpet

Salesforce Training in Pune

Salesforce Online Training

Salesforce Training

Very nice blogs!!! i have to learning for lot of information for this sites…Sharing for wonderful information.Thanks for sharing this valuable information to our vision. You have posted a trust worthy blog keep sharing, data science online training

"It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
data science courses"

Really impressed! Everything is very open and very clear clarification of issues. It contains truly facts. Your website is very valuable. Thanks for sharing.
data scientist training and placement in hyderabad

You guys will be greatful to know that our institution is conducting online CS executive classes and a free CSEET classes only for you guys. If anyone is interested then feel free to contact us or visit our website for more details https://uniqueacademyforcommerce.com/

best digital marketing agancy new tips for best digital marketing
free classified submission sites list
kishorsasemahal

Here is the best music to calm and relax your mind

1. best relaxing music
2. best Depp sleep music
3. best meditation music
4. best calm music
5. best deep focus music

AximTrade Review Is A Forex And Cfd Broker. It Offers Trading In Currency Pairs, Commodities, Indices, And Shares. It Also Provides A Range Of Tools, And 24/7 Customer Service. Sign Up For Aximtrade Login Account Today!

AVATRADE REVIEW Review - Find Out Everything About This Forex Broker. Read Our Detailed Fx Choice Review And Make Sure If This Broker Is For You. We Scrutinized The Broker And The Trading Conditions Thoroughly.

It's a great pleasure reading your post.Its full of information I am looking for and I love to post a comment that "The content of your post is awesome" Great work.
data scientist training in hyderabad

Thanks for posting the best information the blog is very important.
Jewellery Billing Software
Jewellery Billing Software

This is a very good article, we have told about Kinemaster on our site Kinemaster App