Files
doc-exports/docs/mrs/umn/admin_guide_000420.html
yangtong c285e88a17 MRS UMN 20250806 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: yangtong <yangtong2@huawei.com>
Co-committed-by: yangtong <yangtong2@huawei.com>
2025-09-02 10:43:57 +00:00

23 lines
3.3 KiB
HTML

<a name="admin_guide_000420"></a><a name="admin_guide_000420"></a>
<h1 class="topictitle1">Changing the OS User Password Validity Period</h1>
<div id="body0000002380265894"><div class="section" id="admin_guide_000420__section188316117538"><h4 class="sectiontitle">Scenario</h4><p id="admin_guide_000420__p28541442533">By default, the password validity period of an OS user is 90 days. This topic describes how to change the validity period.</p>
<p id="admin_guide_000420__p46575018113149">You are advised to periodically change a user's login password of the cluster node operating system to improve system O&amp;M security.</p>
</div>
<div class="section" id="admin_guide_000420__section203401450165515"><h4 class="sectiontitle">Procedure</h4><ol id="admin_guide_000420__ol14296123312566"><li id="admin_guide_000420__li1296173365616"><span>Log in to the node where you want to change the password validity period of the OS user password as the <strong id="admin_guide_000420__b16973115918336">root</strong> user.</span></li><li id="admin_guide_000420__li13553192904810"><span>Change the OS user password validity period.</span><p><ul id="admin_guide_000420__ul816104284810"><li id="admin_guide_000420__li91181226184919"><strong id="admin_guide_000420__b030315306351">Legacy users</strong><p id="admin_guide_000420__p57819264494">Run the following command to change the password validity period:</p>
<p id="admin_guide_000420__p1227434111498"><strong id="admin_guide_000420__b2066420515365">chage -M</strong><em id="admin_guide_000420__i32875913718">Validity period (days) user_name</em></p>
<div class="note" id="admin_guide_000420__note137171020205813"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="admin_guide_000420__ul9278210181418"><li id="admin_guide_000420__li12787102142"><em id="admin_guide_000420__i19978121517417">Validity period (days)</em>: how many days the password is valid since its creation. If this parameter is set to <strong id="admin_guide_000420__b1199211582404">99999</strong>, the password never expires. Set this parameter based on the site requirements.</li><li id="admin_guide_000420__li327871091417"><em id="admin_guide_000420__i17947311184119">user_name</em>: OS user whose validity period you want to change, for example, <strong id="admin_guide_000420__b1938913342417">ommdba</strong>.</li><li id="admin_guide_000420__li182789107143">You are advised to set this parameter based on service demands and periodically change the user password.</li></ul>
</div></div>
</li><li id="admin_guide_000420__li191661157144912"><strong id="admin_guide_000420__b59071828114210">New users</strong><p id="admin_guide_000420__p193128507">Run the following command to edit the file and change the value of <strong id="admin_guide_000420__b10504145016428">PASS_MAX_DAYS</strong>, which indicates the password validity period, in days. If the value is changed to <strong id="admin_guide_000420__b117518913439">99999</strong>, the password never expires.</p>
<p id="admin_guide_000420__p1810163545014"><strong id="admin_guide_000420__b883915485718">vi /etc/login.defs</strong></p>
</li></ul>
</p></li></ol>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="admin_guide_000249.html">Changing the Password for a System User</a></div>
</div>
</div>