Made passwd hiding print calls more general.