The creation statement is correct. What you are looking for is not in the mongo information. What you need to know is the usage of linux shell and the escaping of spaces or quotes
mongo test --eval "db.createUser({user:\"rwuser\", pwd:\"titan7vc65x\", roles:[{role:\"readWrite\", db:\"test\"}]})"
The creation statement is correct. What you are looking for is not in the mongo information. What you need to know is the usage of linux shell and the escaping of spaces or quotes