Cloudera Manager 5.15.1忘记密码怎么破?

         Cloudera Manager 5.15.1忘记密码怎么破?

                                      作者:尹正杰

版权声明:原创作品,谢绝转载!否则将追究法律责任。

 

 

 

一.登陆CM修改默认密码

1>.使用默认密码登陆CM界面

2>.登陆数据库,查看CM默认的密码

[root@node101.yinzhengjie.org.cn ~]# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 5.7.25-log MySQL Community Server (GPL)

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> 
mysql> use cdh
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> 
mysql> SELECT * FROM USERS where USER_NAME='admin'\G
*************************** 1. row ***************************
                USER_ID: 1
              USER_NAME: admin
          PASSWORD_HASH: 28050371a6c695ae410da08db8c26607ae2473fefa874016eab0cb72ca730fe4        #我们需要记住该字符串,因为我们在下面还得用到它哟~
          PASSWORD_SALT: -4247944151022041411                                   #它我们也需要记住一下!
         PASSWORD_LOGIN: 1
OPTIMISTIC_LOCK_VERSION: 1
1 row in set (0.00 sec)

mysql> 

3>.点击修改密码

4>.自定义CM的登陆密码

5>.使用之前默认的密码登陆,发现无法正常登陆啦

 

二.观察修改后数据库存储的字符串变化

1>.使用修改后的密码进行登陆

2>.观察此时数据库存储的用户名密码变化

[root@node101.yinzhengjie.org.cn ~]# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 5.7.25-log MySQL Community Server (GPL)

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> 
mysql> use cdh
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> 
mysql> SELECT * FROM USERS where USER_NAME='admin'\G
*************************** 1. row ***************************
                USER_ID: 1
              USER_NAME: admin
          PASSWORD_HASH: 28050371a6c695ae410da08db8c26607ae2473fefa874016eab0cb72ca730fe4
          PASSWORD_SALT: -4247944151022041411
         PASSWORD_LOGIN: 1
OPTIMISTIC_LOCK_VERSION: 1
1 row in set (0.00 sec)

mysql> 
mysql> 
mysql> 
mysql> SELECT * FROM USERS where USER_NAME='admin'\G
*************************** 1. row ***************************
                USER_ID: 1
              USER_NAME: admin
          PASSWORD_HASH: 250041eb472c23cf8c676c241439d8a7b99c2a3ea9df3cc37fb3eefd5ab43029        #发现没有?它发生变化啦!
          PASSWORD_SALT: -6043720566682334983                                   #该值也发生变化啦~
         PASSWORD_LOGIN: 1
OPTIMISTIC_LOCK_VERSION: 2
1 row in set (0.00 sec)

mysql> 

 

三.还原CM默认密码

1>.还原CM默认登陆密码

[root@node101.yinzhengjie.org.cn ~]# mysql -uroot -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 13
Server version: 5.7.25-log MySQL Community Server (GPL)

Copyright (c) 2000, 2019, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> 
mysql> use cdh
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> 
mysql> SELECT * FROM USERS where USER_NAME='admin'\G
*************************** 1. row ***************************
                USER_ID: 1
              USER_NAME: admin
          PASSWORD_HASH: 250041eb472c23cf8c676c241439d8a7b99c2a3ea9df3cc37fb3eefd5ab43029
          PASSWORD_SALT: -6043720566682334983
         PASSWORD_LOGIN: 1
OPTIMISTIC_LOCK_VERSION: 2
1 row in set (0.00 sec)

mysql> 
mysql> update USERS set PASSWORD_HASH='28050371a6c695ae410da08db8c26607ae2473fefa874016eab0cb72ca730fe4',PASSWORD_SALT='-4247944151022041411' WHERE USER_NAME='admin';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> 
mysql> SELECT * FROM USERS where USER_NAME='admin'\G
*************************** 1. row ***************************
                USER_ID: 1
              USER_NAME: admin
          PASSWORD_HASH: 28050371a6c695ae410da08db8c26607ae2473fefa874016eab0cb72ca730fe4
          PASSWORD_SALT: -4247944151022041411
         PASSWORD_LOGIN: 1
OPTIMISTIC_LOCK_VERSION: 2
1 row in set (0.00 sec)

mysql> 

2>.使用默认密码进行登陆

3>.登陆成功

 

转载于:https://www.cnblogs.com/yinzhengjie/p/11071656.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值