r/linuxadmin • u/greenkiweez • Feb 09 '26
User password rotation on edge servers
Hi all,
what's a good practice for rotation user passwords on edge servers with unreliable internet access.
We're running our servers in several customer's data centers and some of them require us to rotate passwords each N months (we're obviously using ssh keys for access but an expired account password causes broken servies and cronjobs and we 're spending needless effort rotating them.
What is a good and lightweight solution to rotate passwords without joining all servers to some central zero-trust system (poor internet connectivity, these sites need to be able to run headless).
Similar to what we're doing semi-manually now would be writing some custom script that routinely sets passwords from a pre-defined list but that's obviously a horrible solution.
3
u/[deleted] Feb 10 '26
Users shouldn't have a password on a server, just a key.
A unique password can be useful as a break glass, entered via the BMC / ILO. That should be the only one in the system.
19
u/smallcrampcamp Feb 09 '26
Bro, what..
Its 2026, learn automation and/or centralized account management.
13
u/ramriot Feb 09 '26
WTF! who in the name of the twentyfirst century is still requiring password rotation in the absence of a detected breach.
4
u/altodor Feb 09 '26
I've never used a password on a linux service account or cron job. Systemd declares what's happening as a service account, I believe that works for cron too. All my remote jobs (such as SFTP) are SSH keys and no passwords or run a service that integrates the comms protocol. As it stands today, my Linux servers can't actually be accessed by a password.
1
u/brandonholm Feb 10 '26
Bro this is 2026, why are you still rotating passwords?
2
u/bityard Feb 09 '26 edited Feb 09 '26
There's not nearly enough information here but I'll take a swing at it anyway. You say these are user accounts, so I assume they are database or service users are not needed for remote access/administration, correct?
If so, write a script that lives on each host. This script changes the password to a random string and updates any configuration files that need it. Then restarts or reloads affected services.
If you need the password to be sent back to the mothership for some reason, then encrypt it with a public key and send it home via email or API call and store it in something like vault.
2
u/NoTheme2828 Feb 09 '26
Forced password changes are outdated! Instead, the number of characters should be increased. With 20 characters and a complexity of 4, a change is only necessary when absolutely necessary. Guessing is virtually impossible.