Thursday, August 02, 2012

mongodb: add user

to add a db user
# db.adduser(<username>, <password>);

to log in using a newly created user, you first have to authenticate in db
# db.auth(<username>, <password>);

to remove a user
# db.system.users.remove({"user" : <username>});

yep, you can use other parameters in matching user/s you want to remove :)

No comments:

Post a Comment

SSH : No matching host key type found. Their offer: ssh-rsa,ssh-dss

Got this while connecting to my mikrotik router via ssh   Unable to negotiate with <ip address> port <ssh port>: no matching hos...