Installing MongoDB to run under a custom principle AD account

22 views
Skip to first unread message

Peter Santiago

unread,
Jun 30, 2015, 2:49:38 PM6/30/15
to mongod...@googlegroups.com

Having a challenge getting mongoDB to run as service under a custom principle account. This is what I executed in a shell with admin access

sc.exe create MongoDB binPath= "E:\Program Files\MongoDB\Server\3.0\bin\mongod.exe --auth --service --config=\"F:\MongoData\mongodb.cfg\"" DisplayName= "MongoDB" start= "auto" obj= "Krypton\Superman" password= "L0ves2Sp00Ge"

I get an Error 1503: The service did not respond to the start or control (see attached)... when I fire it up. However, it seems to work when I run it under the "Local System" account.

mongoDBStartError.jpg

Andrew Ryder

unread,
Jul 22, 2015, 1:18:46 AM7/22/15
to mongodb-user
Hi Peter!

There could be a number of things that might cause this, though likely permissions related to the user involved, and usually the server.log will tell us what is going on. Can you please:
# Provide the server.log (specified in the config file).
# Provide the config file (F:\MongoData\mongodb.cfg)
# What happens when you run the following from a command-prompt:
{code}
runas /user:Krypton\Superman "\"E:\Program Files\MongoDB\Server\3.0\bin\mongod.exe\" --auth --service --config=\"F:\MongoData\mongodb.cfg\""
{code}
(note I haven't tested this precisely so it may require some syntactic tweaks to make the equivalent command-line work as that user, please adjust for intent)

Cheers,
Andrew

Reply all
Reply to author
Forward
0 new messages