简体   繁体   English

如何使用zendmd在Zenoss中重置密码(或解锁用户)? (常用方法无效)

[英]How to reset a password (or unlock user) in Zenoss using zendmd? (Usual methods don't work)

I'm new to Zenoss and hired as a System Administrator somewhere that has lost all of their credentials to access Zenoss Control Center WebUI! 我是Zenoss的新手,因此被聘为系统管理员,而该人失去了访问Zenoss Control Center WebUI的所有凭据! Now I've been assigned to find a way to reset admin (or any other user) password. 现在,我被分配去寻找一种重置管理员(或任何其他用户)密码的方法。 I've checked the web thoroughly and came across zendmd, a python shell connected to Zenoss database. 我已经仔细检查了网络,并发现了zendmd,这是一个连接到Zenoss数据库的python shell。 Using this link I tried to set the new password, but though it does not throw any errors, I still cannot login with the new credentials I've set. 使用此链接,我尝试设置新密码,但是尽管它不会引发任何错误,但仍然无法使用设置的新凭据登录。 Also I tried using zenpass which is a small script to set the new admin password, but still it seems that it has no effect. 我也尝试使用zenpass ,这是一个用于设置新管理员密码的小脚本,但似乎仍然没有效果。 I am familiar with python (fortunately) and I'm trying to understand how I can manipulate database to be able to login. 我很熟悉python(很幸运),并且我试图了解如何操纵数据库才能登录。 But as this is a OO database and not a relational one, I cannot query it directy. 但是由于这是一个面向对象的数据库,而不是一个关系数据库,因此我无法直接对其进行查询。 So far, my attemps on fixing the issue have been unsuccessful. 到目前为止,我在解决该问题上的尝试均未成功。 Part of it is because there are no documentation related to zendmd objects and classes, and I have to read developer comments to find out what is going on. 部分原因是因为没有与zendmd对象和类相关的文档,我必须阅读开发人员注释以了解发生了什么。

Is there any way to reset this? 有什么办法可以重置吗? or at least find out what is going on here? 或至少找出这里发生了什么? I also suspect that the accounts are locked, but I've had no luck finding a way to check this. 我还怀疑这些帐户已被锁定,但是我没有运气找到一种检查方法。

New findings 新发现

I was able to send a reset password email using the following method in zendmd: 我可以使用zendmd中的以下方法发送重置密码电子邮件:

dmd.ZenUsers.user01.manage_resetPassword()

The password in the mail does not work. 邮件中的密码不起作用。 I guess my problem is not the password, but some other issue with the login...but no idea of what it can be. 我想我的问题不在于密码,而是与登录有关的其他问题……但不知道可能是什么。 Any help is appreciated. 任何帮助表示赞赏。

Well, after some research I found out that I was trying to log in into a wrong login interface! 好吧,经过一番研究,我发现我试图登录到错误的登录界面! The Control Center is different from Zenoss WebUI (rookie mistake) and now it is OK. 控制中心不同于Zenoss WebUI(菜鸟错误),现在可以了。

All of the methods with zendmd work perfectly. 使用zendmd的所有方法都可以完美工作。 Actually, this helped me learn a bit of zenoss python shell, which would definitely be useful in close future. 实际上,这帮助我学习了一些zenoss python shell,这在不久的将来肯定会有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM