mongodb Key File文件生成
admin
2023-04-12 10:23:33
0

参考:http://docs.mongodb.org/manual/tutorial/generate-key-file/

Generate a Key File

Overview

This section describes how to generate a key file to store authentication information. After generating a key file, specify the key file using the keyFile option when starting a mongod or mongos instance.

A key’s length must be between 6 and 1024 characters and may only contain characters in the base64 set. The key file must not have group or world permissions on UNIX systems. Key file permissions are not checked on Windows systems.


1、Create a key file.

Create the key file your deployment will use to authenticate servers to each other.

To generate pseudo-random data to use for a keyfile, issue the following openssl command:


openssl rand -base64 741 > mongodb-keyfile

chmod 600 mongodb-keyfile

chown mongod.mongod mongodb-keyfile


You may generate a key file using any method you choose. Always ensure that the password stored in the key file is both long and contains a high amount of entropy. Using openssl in this manner helps generate such a key.


2、Specify the key file when starting a MongoDB instance.

Specify the path to the key file with the keyFile option.


相关内容

热门资讯

原创 3... 周鸿祎创办的360集团是中国网络安全领域龙头企业,经过20年的发展和积累,已拥有四个“全球领先”优势...
【第一资讯】“17麻将十三水怎... 家人们!今天小编来为大家解答17麻将十三水透视挂怎么安装这个问题咨询软件客服徽9752949的挂在哪...
今日重大消息“九酷牛牛怎么开挂... 您好:九酷牛牛这款游戏可以开挂,确实是有挂的,需要了解加客服微信【4282891】很多玩家在这款游戏...
今日重大消息“微乐锄大地怎么开... 家人们!今天小编来为大家解答微乐锄大地透视挂怎么安装这个问题咨询软件客服徽4282891的挂在哪里买...
今日重大发现“乐游510k是不... 今日重大发现“乐游510k是不是有挂?”(确实真的有挂)您好,乐游510k这个游戏其实有挂的,确实是...
今日重大发现“么么都莱游戏开挂... 您好:么么都莱游戏这款游戏可以开挂,确实是有挂的,需要了解加客服微信【9784099】很多玩家在这款...
【第一消息】“快乐竞技怎么开挂... 【第一消息】“快乐竞技怎么开挂?”(必胜开挂神器)您好,快乐竞技这个游戏其实有挂的,确实是有挂的,需...
玩家最新攻略“新毛豆互娱开挂器... 有 亲,根据资深记者爆料新毛豆互娱是可以开挂的,确实有挂(咨询软件无需打...
玩家攻略科普“皇豪互娱拼三张开... 家人们!今天小编来为大家解答皇豪互娱拼三张透视挂怎么安装这个问题咨询软件客服徽9784099的挂在哪...
重磅消息“欢喜麻将辅助器?”(... 家人们!今天小编来为大家解答欢喜麻将透视挂怎么安装这个问题咨询软件客服徽9752949的挂在哪里买很...