26 07 2019
MongoDB notes
Some notes on MongoDB
Create User
db.createUser( { user: "admin", pwd: "hunter2", roles: [ { role: "root", db: "admin" } ] } );
Authenticate as admin to do stuff
use admin db.auth('admin','hunter2')
Add user for db
db.createUser({ user: "db1user", pwd: "hunter3", roles: [{ role: "readWrite", db: "db1" }] })
Add server to replication set
rs.add("server1.serverhostna.me")
Add a server replication set as a non voting member.
rs.add({ "host":"server2.serverhostna.me", "votes": 0, "priority":0 })
FreeIPA: Manually deleting host in LDAP CRITICAL – hpasmd needs to be restarted, System: ‘unknown’, S/N: ‘unknown’, ROM: ‘unknown’