in reply to using Unix::PasswdFile to change either the password or the shell of a user


since unix-flavors tend to use different password databases and /etc/password is mostly a relic from the past that is kept for backward compatibility issues (i think), your best bet for changing a password is using a platforms native password changing utility, for most (all?) platforms that would be the passwd utility. What I'd do is write a script that uses Expect to interact with the native password changing utility.