forked from docs/doc-exports
Reviewed-by: Kacur, Michal <michal.kacur@t-systems.com> Co-authored-by: Yang, Tong <yangtong2@huawei.com> Co-committed-by: Yang, Tong <yangtong2@huawei.com>
74 lines
9.5 KiB
HTML
74 lines
9.5 KiB
HTML
<a name="mrs_01_24575"></a><a name="mrs_01_24575"></a>
|
|
|
|
<h1 class="topictitle1">Configuring the Password of the Default Account of a ClickHouse Cluster</h1>
|
|
<div id="body8662426"><p id="mrs_01_24575__p119447381453">After a ClickHouse cluster is created, you can use the ClickHouse client to connect to the ClickHouse server.</p>
|
|
<p id="mrs_01_24575__p7944153811515">Configure the passwords of the default accounts <strong id="mrs_01_24575__b172214514">default</strong> and <strong id="mrs_01_24575__b1467625105117">clickhouse</strong> of a ClickHouse cluster.</p>
|
|
<div class="note" id="mrs_01_24575__note683144842616"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="mrs_01_24575__ul716019595514"><li id="mrs_01_24575__li779111418818">This section applies to MRS 3.2.0 or later.</li><li id="mrs_01_24575__li3447479488"><strong id="mrs_01_24575__b63004851454313">default</strong> and <strong id="mrs_01_24575__b19830192213358">clickhouse</strong> is the default internal administrator of a ClickHouse cluster in normal mode (with Kerberos authentication disabled).</li></ul>
|
|
</div></div>
|
|
<div class="section" id="mrs_01_24575__section20349526153"><h4 class="sectiontitle">Configuring the Password of the Default Account of a ClickHouse Cluster</h4><ol id="mrs_01_24575__ol126601090156"><li id="mrs_01_24575__li835511128381"><span>Install the ClickHouse client.</span></li><li id="mrs_01_24575__li191794125531"><span>Log in to the ClickHouse client node as user <strong id="mrs_01_24575__b23584845419">root</strong>, go to <em id="mrs_01_24575__i1461351420516">Client installation directory</em><strong id="mrs_01_24575__b1142672810519">/ClickHouse/clickhouse/config</strong>, and check whether the <strong id="mrs_01_24575__b69248495520">metrika.xml</strong> file contains information about all ClickHouseServer nodes. If information of any nodes is missing, add it.</span><p><div class="p" id="mrs_01_24575__p120363119584">For example, there are four ClickHouseServer nodes: <strong id="mrs_01_24575__b108937190013">192-168-43-125</strong>, <strong id="mrs_01_24575__b45102287015">192-168-43-165</strong>, <strong id="mrs_01_24575__b16855173410010">192-168-43-175</strong>, and <strong id="mrs_01_24575__b521017218810">192-168-43-249</strong>.<pre class="screen" id="mrs_01_24575__screen4139102955810"><shard>
|
|
<internal_replication>true</internal_replication>
|
|
<replica>
|
|
<host><strong id="mrs_01_24575__b1138132925815">192-168-43-125</strong></host>
|
|
<port>21423</port>
|
|
<user>clickhouse</user>
|
|
<password/>
|
|
</replica>
|
|
<replica>
|
|
<host><strong id="mrs_01_24575__b17138229185812">192-168-43-165</strong></host>
|
|
<port>21423</port>
|
|
<user>clickhouse</user>
|
|
<password/>
|
|
</replica>
|
|
</shard>
|
|
<shard>
|
|
<internal_replication>true</internal_replication>
|
|
<replica>
|
|
<host><strong id="mrs_01_24575__b11391429105819">192-168-43-175</strong></host>
|
|
<port>21423</port>
|
|
<user>clickhouse</user>
|
|
<password/>
|
|
</replica>
|
|
<replica>
|
|
<host><strong id="mrs_01_24575__b2139102916588">192-168-43-249</strong></host>
|
|
<port>21423</port>
|
|
<user>clickhouse</user>
|
|
<password/>
|
|
</replica>
|
|
</shard></pre>
|
|
</div>
|
|
<p id="mrs_01_24575__p126289466118"></p>
|
|
</p></li><li id="mrs_01_24575__li1659119485116"><span>Go to <em id="mrs_01_24575__i1865523719819">Client installation directory</em><strong id="mrs_01_24575__b346844586">/ClickHouse/clickhouse/config</strong> and check whether the values of <strong id="mrs_01_24575__b69831857187">CLICKHOUSE_CONF_DIR</strong> and <strong id="mrs_01_24575__b836615337916">CLICKHOUSE_INSTALL_HOME</strong> in the <strong id="mrs_01_24575__b53611316915">clickhouse-env.sh</strong> file is <strong id="mrs_01_24575__b31894286915">$BIGDATA_HOME/FusionInsight_ClickHouse_xxx/*_ClickHouseServer/etc</strong> and <strong id="mrs_01_24575__b194025517101">$BIGDATA_HOME/FusionInsight_ClickHouse_xxx/install/FusionInsight-ClickHouse-*-lts/</strong>, respectively.</span><p><p id="mrs_01_24575__p589010336620"><span><img id="mrs_01_24575__image66836319324" src="en-us_image_0000001583316949.png"></span></p>
|
|
</p></li><li id="mrs_01_24575__li17661149121511"><span>Switch to user <strong id="mrs_01_24575__b396719111418">omm</strong> and go to the <em id="mrs_01_24575__i1036710265210">Client installation directory</em><strong id="mrs_01_24575__b156214795212">/ClickHouse/clickhouse_change_password</strong> directory.</span><p><p id="mrs_01_24575__p11481857308"><strong id="mrs_01_24575__b114819571602">su - omm</strong></p>
|
|
<p id="mrs_01_24575__p15676195713166"><strong id="mrs_01_24575__b10461910164011">cd</strong> <em id="mrs_01_24575__i3444224101314">Client installation directory</em><strong id="mrs_01_24575__b5462151034016">/ClickHouse/clickhouse_change_password</strong></p>
|
|
</p></li><li id="mrs_01_24575__li3859111520327"><span>Run the following command to change the password of the <strong id="mrs_01_24575__b85585013611047">default</strong> or <strong id="mrs_01_24575__b6885122041314">clickhouse</strong> user:</span><p><p id="mrs_01_24575__p086613154324"><strong id="mrs_01_24575__b1024694943217">./change_password.sh</strong></p>
|
|
<p id="mrs_01_24575__p1888613618180">In the following figure, user <strong id="mrs_01_24575__b1929593619150">clickhouse</strong> is used as an example. Enter <strong id="mrs_01_24575__b1947164321618">clickhouse</strong> and its password as prompted, and wait until the password is changed.</p>
|
|
<p id="mrs_01_24575__p8674112521720"><span><img id="mrs_01_24575__image96744257178" src="en-us_image_0000001532677010.png"></span></p>
|
|
<div class="note" id="mrs_01_24575__note16385185011291"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="mrs_01_24575__p1253217143010">The password complexity requirements are as follows:</p>
|
|
<ul id="mrs_01_24575__ul1053354819302"><li id="mrs_01_24575__li1453324817307">The password contains 8 to 64 characters.</li><li id="mrs_01_24575__li2533124813302">The password must contain at least one lowercase letter, one uppercase letter, one digit, and one special character, and the following special characters are supported: -%;[]{}@_</li></ul>
|
|
</div></div>
|
|
</p></li><li id="mrs_01_24575__li1057581111209"><span>Check the password change result.</span><p><ol type="a" id="mrs_01_24575__ol1325675121913"><li id="mrs_01_24575__li142561253197">Run the following commands to check the value of <strong id="mrs_01_24575__b14543103375512">CLICKHOUSE_CONF_DIR</strong> in the <em id="mrs_01_24575__i83451045105515">Client installation directory</em><strong id="mrs_01_24575__b1569395875512">/ClickHouse/clickhouse/config/clickhouse-env.sh</strong> file:<p id="mrs_01_24575__p16256155101910"><strong id="mrs_01_24575__b93896139235258">cd</strong> <em id="mrs_01_24575__i201618893035258">Client installation directory</em><strong id="mrs_01_24575__b126575390335258">/ClickHouse/clickhouse/config/</strong></p>
|
|
<p id="mrs_01_24575__p16256115111915"><strong id="mrs_01_24575__b192561651197">vi clickhouse-env.sh</strong></p>
|
|
<p id="mrs_01_24575__p16501937172613">The following is an example:</p>
|
|
<pre class="screen" id="mrs_01_24575__screen12564521915">LICKHOUSE_CONF_DIR="<strong id="mrs_01_24575__b525612516193"><em id="mrs_01_24575__i839803382615">${BIGDATA_HOME}/FusionInsight_ClickHouse_*/*</em><em id="mrs_01_24575__i03925334269">_ClickHouseServer/etc</em></strong>"
|
|
CLICKHOUSE_SECURITY_ENABLED="true"
|
|
CLICKHOUSE_BALANCER_LIST="192.168.42.14,192.168.67.89"
|
|
CLICKHOUSE_STARTUP_PRINCIPAL="clickhouse/hadoop.hadoop.com@HADOOP.COM"
|
|
USER_REALM="HADOOP.COM"
|
|
OM_DECOMMISSION_HOSTNAME_LIST=""
|
|
CLICKHOUSE_INSTALL_HOME="${BIGDATA_HOME}/FusionInsight_ClickHouse_8.2.0/install/FusionInsight-ClickHouse-v22.3.2.2-lts"
|
|
CK_BALANCER_LIST="server-2110081635-0003,server-2110082001-0019"</pre>
|
|
</li></ol><ol type="a" start="2" id="mrs_01_24575__ol1625517512196"><li id="mrs_01_24575__li16255165111917">Log in to the ClickHouse Server node and check the value of <strong id="mrs_01_24575__b52921657145612">password_sha256_hex</strong> in the <strong id="mrs_01_24575__b3406175125714">${BIGDATA_HOME}/FusionInsight_ClickHouse_*/*_ClickHouseServer/etc/users.xml</strong> file. The value is the new password.<p id="mrs_01_24575__p02552591910"><strong id="mrs_01_24575__b115262208251">cd ${BIGDATA_HOME}/</strong><em id="mrs_01_24575__i51347211259">FusionInsight_ClickHouse_*</em><strong id="mrs_01_24575__b4311825182518">/</strong><em id="mrs_01_24575__i8842112532510">*_ClickHouseServer</em><strong id="mrs_01_24575__b15311125102514">/etc/</strong></p>
|
|
<p id="mrs_01_24575__p13255105151913"><strong id="mrs_01_24575__b02551752192">vi </strong><strong id="mrs_01_24575__b1125513512199">users.xml</strong></p>
|
|
<p id="mrs_01_24575__p480851142416">As shown in the following figure, the new password is stored in the <strong id="mrs_01_24575__b4541132341813">password_sha256_hex</strong> file.</p>
|
|
<p id="mrs_01_24575__p20165105812314"><span><img id="mrs_01_24575__image41651658182312" src="en-us_image_0000001583436657.png"></span></p>
|
|
</li></ol>
|
|
</p></li></ol>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_01_24251.html">User Management and Authentication</a></div>
|
|
</div>
|
|
</div>
|
|
|