authentication - Enabling mongodb auth -
i have install of ubuntu 14.04 x64 thing have done fresh update , install mongodb , pritunl. here how installed both
$ nano /etc/apt/sources.list.d/mongodb-org-3.0.list deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.0 multiverse $ nano /etc/apt/sources.list.d/pritunl.list deb http://repo.pritunl.com/stable/apt trusty main $ apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv 7f0ceb10 $ apt-key adv --keyserver hkp://keyserver.ubuntu.com --recv cf8e292a $ apt-get update $ apt-get install pritunl mongodb-org $ service pritunl start
now enable auth on mongodb 3.0.9 have used guide here https://medium.com/@matteocontrini/how-to-setup-auth-in-mongodb-3-0-properly-86b60aeef7e8#.a1nfxsy3a
after create first user , i
security: authorization: enabled
i run problems cant make connection locahost here error receive
~# mongo pritunl --port 27017 -u admin -p passwordhere --authe nticationdatabase admin mongodb shell version: 3.0.9 connecting to: 127.0.0.1:27017/pritunl 2016-02-08t00:18:54.096-0500 w network failed connect 127.0.0.1:27017, re ason: errno:111 connection refused 2016-02-08t00:18:54.098-0500 e query error: couldn't connect server 127.0. 0.1:27017 (127.0.0.1), connection attempt failed @ connect (src/mongo/shell/mongo.js:181:14) @ (connect):1:6 @ src/mongo/shell/mongo.js:181 exception: connect failed
or attempting connect admin
~# mongo admin — port 27017 -u admin -p password — authenticationdatabase admin mongodb shell version: 3.0.9 connecting to: 127.0.0.1:27017/admin 2016–02–07t09:54:09.436–0500 w network failed connect 127.0.0.1:27017, reason: errno:111 connection refused 2016–02–07t09:54:09.438–0500 e query error: couldn’t connect server 127.0.0.1:27017 (127.0.0.1), connection attempt failed @ connect (src/mongo/shell/mongo.js:181:14) @ (connect):1:6 @ src/mongo/shell/mongo.js:181 exception: connect failed
or other way try , make connection. feel missing simple. thought maybe screwing user creation have used tried using http://3t.io/mongochef/ gui take potential typing errors out of user creation.
i have been fighting few days , wearing google out not getting traction. @ point pay in figuring out im messing know how fix have knowledge of how implement basic security. can pay bitcoin
# mongod.conf # documentation of options, see: # http://docs.mongodb.org/manual/reference/configuration-options/ # , how store data. storage: dbpath: /var/lib/mongodb journal: enabled: true # engine: # mmapv1: # wiredtiger: # write logging data. systemlog: destination: file logappend: true path: /var/log/mongodb/mongod.log # network interfaces net: port: 27017 bindip: 127.0.0.1 #processmanagement: security: authorization: enabled #operationprofiling: #replication: #sharding: ## enterprise-only options: #auditlog: #snmp:
Comments
Post a Comment