This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"_id":"Beijing","population":1.952e+07,"location":{"type":"Point","coordinates":[116.383333,39.916667]}} | |
{"_id":"Delhi","population":2.4953e+07,"location":{"type":"Point","coordinates":[77.23,28.61]}} | |
{"_id":"Guangzhou","population":2.0597e+07,"location":{"type":"Point","coordinates":[113.266667,23.133333]}} | |
{"_id":"Mexico City","population":2.0843e+07,"location":{"type":"Point","coordinates":[-99.133333,19.433333]}} | |
{"_id":"Mumbai","population":2.0741e+07,"location":{"type":"Point","coordinates":[72.825833,18.975]}} | |
{"_id":"New York","population":1.8591e+07,"location":{"type":"Point","coordinates":[-74.0059,40.7127]}} | |
{"_id":"North Pole","population":1.0,"location":{"type":"Point","coordinates":[0.0,90.0]}} | |
{"_id":"Osaka","population":2.0123e+07,"location":{"type":"Point","coordinates":[135.502222,-34.693889]}} | |
{"_id":"Shanghai","population":2.2991e+07,"location":{"type":"Point","coordinates":[121.5,31.2]}} | |
{"_id":"São Paulo","population":2.0831e+07,"location":{"type":"Point","coordinates":[-46.633333,-23.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ rpm -ihv centrifydc-5.2.0-rhel3-x86_64.rpm | |
$ adjoin -V -w -u ldap_admin mongotest.com | |
[email protected]'s password: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ kinit [email protected] | |
Password for [email protected]: | |
$ mongo --host lin-client.mongotest.com | |
> db.getSiblingDB("$external").auth( | |
{ | |
mechanism: "GSSAPI", | |
user: "[email protected]", | |
} | |
) | |
1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ nano /etc/mongod.conf | |
# Listen to local interface only. Comment out to listen on all interfaces. | |
#bind_ip=127.0.0.1 | |
auth=true | |
setParameter=authenticationMechanisms=GSSAPI | |
$ service mongod stop | |
$ env KRB5_KTNAME=/home/ec2-user/mongod_lin.keytab mongod -f /etc/mongod.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ adkeytab -n -P mongodb/[email protected] -U mongodb/[email protected] -K /home/ec2-user/mongod_lin.keytab -c "OU=support" -V --user ldap_admin lin-client-svc | |
[email protected]'s password: | |
$ adquery user lin-client-svc -PS | |
userPrincipalName:mongodb/[email protected] | |
servicePrincipalName:mongodb/lin-client.mongotest.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ mongo | |
> db.getSiblingDB("$external").auth( | |
{ | |
mechanism: "PLAIN", | |
user: "alex", | |
pwd: "xxx", | |
digestPassword: false | |
} | |
) | |
1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ nano /etc/mongod.conf | |
auth=true | |
setParameter=saslauthdPath=/var/run/saslauthd/mux | |
setParameter=authenticationMechanisms=PLAIN | |
$ service mongod restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cp -v /etc/pam.d/{sshd,mongodb} | |
`/etc/pam.d/sshd' -> `/etc/pam.d/mongodb' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ service saslauthd start | |
Starting saslauthd: [ OK ] | |
$ chkconfig saslauthd on | |
$ chkconfig --list saslauthd | |
saslauthd 0:off 1:off 2:on 3:on 4:on 5:on 6:off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ grep ^MECH /etc/sysconfig/saslauthd | |
MECH=pam |
NewerOlder