Support Questions

Find answers, ask questions, and share your expertise
Celebrating as our community reaches 100,000 members! Thank you!

How to view HDFS files when Kerberos is installed

New Contributor

Hi Guys,

I have created a four node cluster on AWS and enable kerberos on it, i like to view the HDFS file. Please let me know, how view HDFS files.


Super Guru

@venkat v

There are two simple steps if you are using command line.

1. Do a kinit using a principal who has access to hadoop. Assuming a principal name "hdp@REALM.COM".

kinit -k -t <hdp.keytab file> hdp@REALM.COM -> if you are using a keytab to login

kinit hdp@REALM.COM -> if you are using principal and its password to login.

2. Run ls command to see the list of files or cat to view the contents.

hadoop hdfs dfs -ls /user/hdp (or a different location within hdfs)

If you don't like command line then

3. Setup HUE to work with Kerberos and browse your files from HUE.


Other 2 ways to access through Ambari is:

1) Using Files View from Ambari ( By setting up Ambari for kerberos )

2) Using Namenode Web UI ( By setting up Ambari for kerberos and SPNEGO Authentication against cluster components).

Hope that Helps!