I am bit new to MongoDb and I am using MongoDb v.2.4.Here the problem is that when I run the mongod with --auth parameter, even after authenticating I am not able to perform
> use admin switched to db admin > db.grantRolesToUser("your_admin_name" ,[ "root"])
This command will give you all privileges on any db as admin.