Improved password change logic to support AIX