Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

(Unauthorized) not authorized on admin to execute command

use admin
db.createUser(
  {
    user: 'admin',
    pwd: 'password',
    roles: [ { role: 'root', db: 'admin' } ]
  }
);
exit;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #authorized #admin #execute #command
ADD COMMENT
Topic
Name
3+5 =