Re: [mongodb-user] authentication with mongoimport

270 views
Skip to first unread message

Scott Hernandez

unread,
Jun 18, 2012, 2:48:06 PM6/18/12
to mongod...@googlegroups.com
You must use user authentication with a username and password. The
keyFile is just used for server to server communication where a user
is not involved.

On Mon, Jun 18, 2012 at 6:23 PM, jacobra <miker...@gmail.com> wrote:
> Hi, I've got a question about 'mongoimport'ing into a sharded, authenticated
> cluster.  It seems that there is no option to specify a --keyFile argument
> with mongoimport and I was wondering how this works.  Can anyone mongoimport
> into any database/collection even with Secure Mode enabled?  Can/should I
> restrict this by modifying the permissions of the mongoimport binary itself?
>  I'm using pymongo, so if you happen to know the appropriate pymongo
> commands off the top of your head, please feel free to include them,
> otherwise mongodb syntax is just fine.
>
> By the way, I'm running mongo-linux-2.0.6 on RHEL 5.  I have 5 physical
> machines, each has a shard and config process, and there are three routers.
>
> Thanks guys.
>
> --
> You received this message because you are subscribed to the Google
> Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com
> To unsubscribe from this group, send email to
> mongodb-user...@googlegroups.com
> See also the IRC channel -- freenode.net#mongodb

jacobra

unread,
Jun 19, 2012, 7:10:57 PM6/19/12
to mongod...@googlegroups.com
Cool thanks.  Got it.  

For anyone else who stumbles here:
I started a mongod config with the --keyFile arg.  Then I logged in from localhost and added an admin.  Now I can mongoimport --file x --user admin --password <pw> and it works.  


On Monday, June 18, 2012 12:48:06 PM UTC-6, Scott Hernandez wrote:
You must use user authentication with a username and password. The
keyFile is just used for server to server communication where a user
is not involved.

On Mon, Jun 18, 2012 at 6:23 PM, jacobra wrote:
> Hi, I've got a question about 'mongoimport'ing into a sharded, authenticated
> cluster.  It seems that there is no option to specify a --keyFile argument
> with mongoimport and I was wondering how this works.  Can anyone mongoimport
> into any database/collection even with Secure Mode enabled?  Can/should I
> restrict this by modifying the permissions of the mongoimport binary itself?
>  I'm using pymongo, so if you happen to know the appropriate pymongo
> commands off the top of your head, please feel free to include them,
> otherwise mongodb syntax is just fine.
>
> By the way, I'm running mongo-linux-2.0.6 on RHEL 5.  I have 5 physical
> machines, each has a shard and config process, and there are three routers.
>
> Thanks guys.
>
> --
> You received this message because you are subscribed to the Google
> Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com
> To unsubscribe from this group, send email to
Reply all
Reply to author
Forward
0 new messages