luqasz / librouteros

Python implementation of MikroTik RouterOS API
GNU General Public License v2.0
224 stars 50 forks source link

Am i doing it right? or its a bug #120

Closed directormac closed 3 years ago

directormac commented 3 years ago

` def update_user_password(self, newName, new_password):

    for selected_user in self.secret.select(MKeys.id, MKeys.name, MKeys.password).where(MKeys.name == newName):
        print(selected_user)
        update_params = {'password': new_password, '.id': selected_user.get('.id')}
        print(selected_user)
        selected_user.update(**update_params)
        print(selected_user)`

Changes are printed into the console but not affecting mikrotik secret, Can you help?

luqasz commented 3 years ago

What do you want to do ? I don't get what's your goal.

directormac commented 3 years ago

Well by that statement i searched the user by name then want to change the password of that account by using the update but nothing changes.

print statements is just me confirming tht i searched it right console prints its updatrd but nothing happened

luqasz commented 3 years ago

password field is considered secret and you will not see it. You can change it though.

directormac commented 3 years ago

How can i change that? i cant seem to find any options to do so.

luqasz commented 3 years ago

How can i change that? i cant seem to find any options to do so.

Just like you do it now.

directormac commented 3 years ago

How can i change that? i cant seem to find any options to do so.

Just like you do it now. adding and removing was no problem but changing or updating seems to fail for me. icant figure out why

luqasz commented 3 years ago

What do you mean by "fails for me" ?