Upgrade is always the best option. In a few months support for V5R4 dies.
Failing that, you can roll your own with QPWDVLDPGM. I've written my own
back in the day to propagate passwords from one lpar to another. Nowadays
I use Tivoli Identity Manager.
But really - upgrade, upgrade, upgrade.