Assigning superuser privileges to a local user

33 views
Skip to first unread message

Rupesh

unread,
May 8, 2013, 5:29:49 PM5/8/13
to idh-...@googlegroups.com, Achuta Rupesh
Hello IDH users,


I am trying to make one of a local user ('rupesh') to be a superuser who manages all the administrative tasks. So, I have changed dfs.permissions.supergroup to the value "hdfs" and I have added local user "rupesh" to the group "hdfs".

But somehow, when I run the command hadoop dfsadmin -report as user "rupesh", I still see permission denied error?

[root@hadoope1 ~]# sudo -u rupesh hadoop dfsadmin -report
report: org.apache.hadoop.security.AccessControlException: Access denied for user rupesh. Superuser privilege is required
[root@hadoope1 ~]# id rupesh
uid=500(rupesh) gid=500(rupesh) groups=500(rupesh),491(hdfs)


Can someone help me with this? Am I missing any configuration steps?


Thanks,
Rupesh

Bhasker Allene

unread,
May 23, 2013, 12:52:36 PM5/23/13
to idh-...@googlegroups.com, Achuta Rupesh
Hi Rupesh,
one thing worth trying is 
Create a new unix user id  that belongs to hdfs group.
execute following command as unix admin.
useradd rupeshadmin -g hdfs -s /bin/bash 
then change password using 
passwd rupeshadmin

if you want add this user to other groups then  
You can create user with -G option as follows 
useradd rupeshadmin -g hdfs -G hadoop,mapred,hbase,zookeeper,hive,sqoop,flume -s /bin/bash

-Cheers,
BA
Reply all
Reply to author
Forward
0 new messages