# 没有设置过密码的zk设置账号和密码
create /newconfig ""
addauth digest zookeeper:zookeeper
setAcl /newconfig auth:zookeeper:zookeeper:rwadc
getAcl /newconfig

# 再次登陆的时候添加认证后才能访问某节点
addauth digest zookeeper:zookeeper

# 正确的拿到密码的方式
echo -n zookeeper:zookeeper | openssl dgst -binary -sha1 | openssl base64

# 如果忘记密码 
skipACL=yes
  • 其实设置更简单的就是一句话的事儿
./zkCli.sh create /newconfig "" digest:zookeeper:4lvlzsipXVaEhXMd+2qMrLc0at8=:rwadc
Copyright © opschina.org 2017 with zzlyzq@gmail.com all right reserved,powered by Gitbook该文件修订时间: 2017-07-11 11:32:48

results matching ""

    No results matching ""