show dbs returns unauthorized

2,402 views
Skip to first unread message

bobb...@technotects.com

unread,
May 2, 2013, 4:43:39 PM5/2/13
to mongod...@googlegroups.com
On a new instance of mongod, I've created a user in admin database with the following roles: userAdminAnyDatabase, readWriteAnyDatabase, dbAdminAnyDatabase.  

After enabling auth and restarting mongod, 'show dbs' fails with the following: JavaScript execution failed: listDatabases failed:{ "ok" : 0, "errmsg" : "unauthorized" } at src/mongo/shell/mongo.js:L46

I'm sure it's something stupid.  What am I missing?

Asya Kamsky

unread,
May 2, 2013, 9:49:58 PM5/2/13
to mongod...@googlegroups.com

bobb...@technotects.com

unread,
May 2, 2013, 10:24:19 PM5/2/13
to mongod...@googlegroups.com
Thanks, that was it.  After added clusterAdmin, it still didn't work right away.  Restarted mongod and mongo shell.  Not sure which solved it, but it's good now.  
Reply all
Reply to author
Forward
0 new messages