authorization: enabled authentication fails

zach lacourse shared this question 9 months ago
Answered

without this enabled my admin user with p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Helvetica Neue'; color: #454545} span.Apple-tab-span {white-space:pre} userAdminAnyDatabase

readWriteAnyDatabase

dbAdminAnyDatabase

clusterAdmin


and even root cant connect remotely but can with auth disabled .. the log error says

Unauthorized not authorized on admin to execute command { listCollections: 1 }

Comments (1)

photo
1

I figured this out it was my fault i had to run db.auth('user','pass') after doing then saving the /etc/mongod.conf file wiith auth enabled i could log in remotely