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.


相关内容

热门资讯

热搜爆了!腾讯张军: 不会开发... 5月11日晚,“微信状态 访客记录”爆上热搜第一。 今天(5月12日),微信员工@客村小蒋发文回应:...
“人工胚胎”,首次进入太空! 来源:市场资讯 (来源:环球网资讯) 来源:央视新闻微信公众号 11日,我国天舟十号成功发射。“人工...
巨婴孙杨,屡教不改 内娱,终于等来了自己的综艺鬼才。体育冠军孙杨,人送外号“高需求宝宝”;艺术体操运动员张豆豆,被网友戏...
微纳米七级分散乳化机选型指南:... 导语:在医药制剂、化工新材料、食品加工等行业中,微纳米级分散乳化机的性能直接影响产品稳定性与生产效率...
全国率先!湖北人形机器人开始登... 当前,我国人形机器人产业爆发,各品牌机器人层出不穷。然而,不同品牌机器人由于技术路径不同,采用的零部...
国标出台,人工智能终端分级工作... 人工智能终端是人工智能技术规模化落地、体系化发展的关键载体。近年来,我国人工智能产业蓬勃发展,人工智...
OPPO「母亲节」交学费,另一... 「核心提示」 母亲节文案翻车背后:OPPO的营销,为何总在“雷区”蹦迪? 作者 | 李白 编...
今天,这场内阁会议或将决定斯塔... 英国工党日前在地方选举中大败,首相斯塔默地位岌岌可危,党内逼宫浪潮高涨。斯塔默将于5月12日召开一场...
定做衣柜要多少钱索菲亚定做衣柜... 回答1: 定做衣柜都是按平米计算的 索菲亚衣柜在全国有连锁店,价格也是统一的,一般一线城市跟...