zoukankan      html  css  js  c++  java
  • 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>.登陆成功

  • 相关阅读:
    Python基础检测:20171105
    Python中斐波那契数列的四种写法
    Python中斐波那契数列的四种写法
    学习Python3:20171031
    学习Python3:20171031
    9.3 Trains and Evaluates the MNIST network using a feed dictionary
    9.3 Trains and Evaluates the MNIST network using a feed dictionary
    学习Python3:201701030
    学习Python3:201701030
    周末微光
  • 原文地址:https://www.cnblogs.com/yinzhengjie/p/11071656.html
Copyright © 2011-2022 走看看