Call to undefined function posix_getpwuid()
Got this error while trying to test user privileges on a newly setup server. If…
Today we’ll create a new user and grant it access to a single database in MongoDB.
Start off by logging into mongodb with your admin/root user
You’ll land at a prompt like below if successfully authenticated
Issue the following to create a new user, replace the placeholders with your
The prompt will return with “Successfully added user” if successful
That’s it, try logging in using the new credentials:
To verify the credentials, issue the following to see how many databases show up
The prompt should return only one database followed by it’s size.