Install MongoDB on OpenSuse

after install run

sudo nano /etc/mongodb.conf
disable security
# Security settings.
#security:
#  authorization: enabled

the restart service and run with config

mongod --config /etc/mongodb.conf

other commands

db.createUser(
  {
    user: "admin",
    pwd: "admin",
    roles: [ { role: "root", db: "admin" } ]
  }
);
db.createUser(
    {
      user: "mahmood",
      pwd: "12345",
      roles: ["readWrite"]
    }
);

References
https://docs.mongodb.com/v3.0/reference/configuration-options/
http://stackoverflow.com/questions/23943651/mongodb-admin-user-not-authorized
http://stackoverflow.com/questions/35881662/mongodb-error-not-authorized-to-execute-command
https://docs.mongodb.com/manual/tutorial/enable-authentication/
http://stackoverflow.com/questions/23003391/how-do-i-add-an-admin-user-to-mongo-in-2-6