Change password python script failed on infrastructure vm

HI…

Everything was working fine until the step where its asked to change password of user adam. When i ran ldapconfig.py script… i got below error and now everything is failing. this python script resulted in below error:

[vagrant@infrastructure shared]$ python ldapconfig.py passwd -u adam -op password -np webscale
Traceback (most recent call last):
File “ldapconfig.py”, line 74, in
main()
File “ldapconfig.py”, line 17, in main
changePassword(args.user, args.old_password, args.new_password)
File “ldapconfig.py”, line 55, in changePassword
l.passwd_s(dn, old_password, new_password)
File “/usr/lib64/python2.7/site-packages/ldap/ldapobject.py”, line 661, in passwd_s
return self.extop_result(msgid,all=1,timeout=self.timeout)
File “/usr/lib64/python2.7/site-packages/ldap/ldapobject.py”, line 579, in extop_result
resulttype,msg,msgid,respctrls,respoid,respvalue = self.result4(msgid,all=1,timeout=self.timeout,add_ctrls=1,add_intermediates=1,add_extop=1)
File “/usr/lib64/python2.7/site-packages/ldap/ldapobject.py”, line 758, in result4
ldap_result = self._ldap_call(self._l.result4,msgid,all,timeout,add_ctrls,add_intermediates,add_extop)
File “/usr/lib64/python2.7/site-packages/ldap/ldapobject.py”, line 331, in _ldap_call
reraise(exc_type, exc_value, exc_traceback)
File “/usr/lib64/python2.7/site-packages/ldap/ldapobject.py”, line 315, in _ldap_call
result = func(*args,**kwargs)
ldap.UNWILLING_TO_PERFORM: {‘info’: u’unwilling to verify old password’, ‘desc’: u’Server is unwilling to perform’}

i was able to spin up replica set without any issue… replica set is still running fine but now neither i can authenticate with old password and nor new. Its so frustrating… its been almost 10 hours fighting with this one homework only. Before i ran change password script, i had below status:

MongoDB Enterprise myrepl:PRIMARY> db.getSiblingDB("$external").auth({mechanism:“PLAIN”, user: “adam”, pwd: “password”, digestPassword: false})

1

MongoDB Enterprise myrepl:PRIMARY> rs.add(“database.m310.mongodb.university:31161”)

{ “ok” : 1 }

MongoDB Enterprise myrepl:PRIMARY> rs.add(“database.m310.mongodb.university:31162”)

{ “ok” : 1 }

MongoDB Enterprise myrepl:PRIMARY> db.isMaster()
{
“hosts” : [
“database.m310.mongodb.university:31160”,
“database.m310.mongodb.university:31161”,
“database.m310.mongodb.university:31162”
],
“setName” : “myrepl”,
“setVersion” : 3,
“ismaster” : true,
“secondary” : false,
“primary” : “database.m310.mongodb.university:31160”,
“me” : “database.m310.mongodb.university:31160”,
“electionId” : ObjectId(“7fffffff0000000000000002”),
“maxBsonObjectSize” : 16777216,
“maxMessageSizeBytes” : 48000000,
“maxWriteBatchSize” : 1000,
“localTime” : ISODate(“2020-01-06T10:43:30.624Z”),
“maxWireVersion” : 4,
“minWireVersion” : 0,
“ok” : 1

and now i get this:

MongoDB Enterprise myrepl:PRIMARY> db.getSiblingDB("$external").auth({mechanism:“PLAIN”, user: “adam”, pwd: “webscale”, digestPassword: false})

Error: Authentication failed.

0

MongoDB Enterprise myrepl:PRIMARY> db.getSiblingDB("$external").auth({mechanism:“PLAIN”, user: “adam”, pwd: “password”, digestPassword: false})

Error: Authentication failed.

0

hi all… so i am not sure how it was done but i destroyed infra vm and brought it back live… and everything worked just fine after that… change password worked well and everything else…

1 Like