1.3 x509 not authorized to createUser

I was able to set the RS.
But the User creating step are giving me such a headache.

rs.status()

{
        "set" : "myReplSet",
        "date" : ISODate("2018-11-25T12:08:17.316Z"),
        "myState" : 1,
        "term" : NumberLong(1),
        "heartbeatIntervalMillis" : NumberLong(2000),
        "members" : [
                {
                        "_id" : 1,
                        "name" : "database.m310.mongodb.university:31130",
                        "health" : 1,
                        "state" : 1,
                        "stateStr" : "PRIMARY",
                        "uptime" : 242,
                        "optime" : {
                                "ts" : Timestamp(1543147687, 1),
                                "t" : NumberLong(1)
                        },
                        "optimeDate" : ISODate("2018-11-25T12:08:07Z"),
                        "infoMessage" : "could not find member to sync from",
                        "electionTime" : Timestamp(1543147686, 1),
                        "electionDate" : ISODate("2018-11-25T12:08:06Z"),
                        "configVersion" : 1,
                        "self" : true
                },
                {
                        "_id" : 2,
                        "name" : "database.m310.mongodb.university:31131",
                        "health" : 1,
                        "state" : 2,
                        "stateStr" : "SECONDARY",
                        "uptime" : 21,
                        "optime" : {
                                "ts" : Timestamp(1543147687, 1),
                                "t" : NumberLong(1)
                        },
                        "optimeDate" : ISODate("2018-11-25T12:08:07Z"),
                        "lastHeartbeat" : ISODate("2018-11-25T12:08:16.550Z"),
                        "lastHeartbeatRecv" : ISODate("2018-11-25T12:08:17.172Z"),
                        "pingMs" : NumberLong(0),
                        "syncingTo" : "database.m310.mongodb.university:31130",
                        "configVersion" : 1
                },
                {
                        "_id" : 3,
                        "name" : "database.m310.mongodb.university:31132",
                        "health" : 1,
                        "state" : 2,
                        "stateStr" : "SECONDARY",
                        "uptime" : 21,
                        "optime" : {
                                "ts" : Timestamp(1543147687, 1),
                                "t" : NumberLong(1)
                        },
                        "optimeDate" : ISODate("2018-11-25T12:08:07Z"),
                        "lastHeartbeat" : ISODate("2018-11-25T12:08:16.564Z"),
                        "lastHeartbeatRecv" : ISODate("2018-11-25T12:08:16.145Z"),
                        "pingMs" : NumberLong(0),
                        "syncingTo" : "database.m310.mongodb.university:31130",
                        "configVersion" : 1
                }
        ],
        "ok" : 1
}

With the mongod statements i used server and ca certs. I´m sure about that because to connect was required to use the ca and client certs, the correct mechanism, auth DB $ext, port xx130 and host d(\w+).m(\d{3}).m(\w+).u(\w+)

Next, when will i create the user by any method availble i get the error:

–not authorized on $external to execute command { createUser: “…,CN=M310 Client”, xxxxx: [ “xxxx” ] }

I really don’t know what i still i can do.

1 Like

Hi Wallas_F_49482,

You might find this discussion helpful.

Enabling X.509 $execute not authorized

David

1 Like

Ty.

I could make it work.

after i move on, i did the hw1.5 correctly. So, i adapted my working on 1.3 and ‘voila’.

ty.

1 Like