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

Hi HeatSeekerCannibal,

I haven't used the module myself, sorry.  And looking at the documention doesn't give any obvious clues.

That said, here are a couple of things I'd look for first:

  1. Are you running this as root (which I'm sure you need to be).
  2. See whether there's any change to the "/etc/passwd" file itself, either in terms of its date/time, or the actual line for "johndoe" (specifically the encrypted password).  Maybe even try it with a different "newpass" to see if that helps.
  3. Try editing the password file by hand, and changing only the password for "johndoe".  Can you do that successfully?

Do any of those things help?


s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/
  • Comment on Re: using Unix::PasswdFile to change either the password or the shell of a user