Open the terminal, enter the command: [sudo gedit /etc/login.defs], enter the administrator password
[PASS_MAX_DAYS 】Change here to 【99999】, click Save. (Only valid for users created after setting, the expiration time of existing user passwords remains unchanged)
(Online video tutorial sharing: linux video tutorial)
At this time, create a user [sudo useradd username] and create a user password [sudo pawwsd username]
Enter the password.
Recommended related articles and tutorials: linux tutorial
The above is the detailed content of How to set user password to never expire in Linux. For more information, please follow other related articles on the PHP Chinese website!