简体   繁体   English

如何从命令行向Hadoop进行身份验证? 删除“ ls:未启用简单身份验证”错误

[英]How to authenticate to Hadoop from command line? Removing `ls: SIMPLE authentication is not enabled` error

I am setting up Kerberos authentication on a Hadoop cluster. 我正在Hadoop群集上设置Kerberos身份验证。 From a machine outside the cluster, whenever I do hadoop fs -ls , I get the following message: ls: SIMPLE authentication is not enabled. Available:[TOKEN, KERBEROS] 从群集外部的计算机上,每当执行hadoop fs -ls ,都会收到以下消息: ls: SIMPLE authentication is not enabled. Available:[TOKEN, KERBEROS] ls: SIMPLE authentication is not enabled. Available:[TOKEN, KERBEROS] , which is nice, since that is what I want. ls: SIMPLE authentication is not enabled. Available:[TOKEN, KERBEROS] ,很好,因为那是我想要的。 But now my question is, how do I actually execute that command succesfully? 但是现在我的问题是,我实际上如何成功执行该命令? I know that I cannot proceed if I don't authenticate, but how do I authenticate from the command line? 我知道如果不进行身份验证就无法继续,但是如何从命令行进行身份验证?

Try below steps 请尝试以下步骤

Server

kadmin.local
addprinc user@realm.com

Client

kinit user@realm.com

klist to view the principals klist查看负责人

Things need to be modified both in the Hadoop server and in the client that is trying to access it. 在Hadoop服务器和尝试访问它的客户端中,都需要修改事物。

Server 服务器

In the server you need to add a new user to the realm, and for that you use the following commands: 在服务器中,您需要向该领域中添加一个新用户,为此,请使用以下命令:

In the kadmin.local shell, type the following command: addprinc user@realm.com . kadmin.local shell中,键入以下命令: addprinc user@realm.com When prompted, type the password twice. 出现提示时,键入两次密码。

Client 客户

Be sure that you have kinit installed and pointing to the Kerberos server of the cluster, and run the following command to acquire a token from the Kerberos server: kinit user@realm.com . 确保已安装kinit并指向集群的Kerberos服务器,然后运行以下命令从Kerberos服务器获取令牌: kinit user@realm.com To verify that you succeeded acquiring it, type klist . 要验证您是否成功获取它,请输入klist

And last, but not least: be sure that your client core-site.xml file is in agreement with the corresponding server-side configuration. 最后但并非最不重要的一点:确保您的客户端core-site.xml文件与相应的服务器端配置一致。 Particularly, be sure that the value for the key hadoop.security.authentication is not simple in your client if it is not simple in your server. 特别是,要确保该键的值hadoop.security.authentication不是simple在你的客户,如果它不是simple在你的服务器。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何从启用基于场的身份验证的ASP.NET应用程序或ASP.NET MVC对基于SharePoint声明的Web应用程序进行身份验证 - How to authenticate sharepoint claims based web application from farm based authentication enabled asp.net application or asp.net mvc 如何从 EXTERNAL AUTHENTICATE 命令 apdu 计算 C-MAC? - How to calculate C-MAC from EXTERNAL AUTHENTICATE command apdu? 如何使用SAML断言对从ac#应用程序到启用WIF的ASP.NET WebApi应用程序的请求进行身份验证 - How to authenticate a request from a c# application to a WIF enabled ASP.NET WebApi application using a SAML assertion 如何对从C#控制台应用程序使用表单身份验证的ASP.NET WebAPI进行身份验证? - How can I authenticate to an ASP.NET WebAPI that is using Forms Authentication From a C# Console Application? 如何限制从命令行启动活动 - How to restrict launching activities from command line 如何从命令行删除钥匙串引用 - How to delete a keychain reference from command line 如何使用表单身份验证和安全性来验证WCF调用 - How to authenticate WCF calls using forms authentication and secutity heroku如何在其命令行应用程序中存储其身份验证? - How does heroku store its authentication on its command-line app? 需要Hadoop webhdfs身份验证 - Hadoop webhdfs Authentication required 如何从命令行重置 Jenkins 安全设置? - How to reset Jenkins security settings from the command line?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM