简体   繁体   English

Cassandra:启动Cassandra之前如何设置密码?

[英]Cassandra: How to set password before starting Cassandra?

Enabling password authentication by editing cassandra.yaml works fine for me. 通过编辑cassandra.yaml启用密码验证对我来说很好。 I can use bin/cqlsh -u cassandra -p cassandra to login. 我可以使用bin/cqlsh -u cassandra -p cassandra登录。

I have the following in cassandra.yaml: 我在cassandra.yaml中具有以下内容:

authenticator: PasswordAuthenticator

What I would like to do is to set the password for user "cassandra" BEFORE I start Cassandra. 我想做的是在启动Cassandra之前为用户“ cassandra”设置密码。 For obvious security reasons, I do not want to start Cassandra with the default password. 出于明显的安全原因,我不想使用默认密码启动Cassandra。 Can this be done? 能做到吗? How? 怎么样?

I am a total Cassandra newbie using Cassandra 2.0.2. 我是使用Cassandra 2.0.2的Cassandra新手。

No. Don't expose Cassandra to the network before changing the password. 否。更改密码之前,请勿将Cassandra暴露给网络。 (Note that Cassandra defaults to only listening on localhost.) (请注意,Cassandra默认只监听本地主机。)

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM