Site icon New Generation Enterprise Linux

Stop the panic when a locked account prevents your emergency maintenance

User & Group Management

Stop the panic when a locked account prevents your emergency maintenance

đź§© The Challenge

Dealing with a vendor service account that expired or got locked right when you need to jump in and fix a production outage is infuriating. You shouldn’t have to scramble to update shadow files or unlock things just to get into the system.

đź’ˇ The Fix

Use the user-level expiration flags to bypass the password lock temporarily without having to reset credentials that your automation might be using. This keeps the credentials intact while letting you get your job done.

chage -M 99999 -E -1 <username>

⚙️ Why It Works

Setting the maximum password age to a massive number and disabling the account expiration date essentially forces the system to treat the user as permanently valid. It’s a quick way to override those pesky policy blocks that pop up at 3 AM.

🚀 Pro-Tip: Check the current policy with chage -l before you make changes so you actually know what the original expiration was.

Linux Tips & Tricks | © ngelinux.com | 8/21/2026

0 0 votes
Article Rating
Exit mobile version