Subject: | Documentation error |
Greetings,
First of all, I would like to say thanks for this module... it helps me a lot. :-)
The module is fine, but the documentation example lacks a bit of information:
printf "%s:%d:%s:%s:[%-11s]:LCT-%08X\n", $login, $uid, $lm, $nt, "U", time;
should be:
printf "%s:%d:%s:%s:[%-11s]:LCT-%08X:\n", $login, $uid, $lm, $nt, "U", time;
without the last field separator (:) the smbpasswd (Samba version 2.2.x) won't update the file if touched by Perl code.
Samba uses an additional flag for user accounts "X". Don't know why, but the smbpasswd program writes such flags for users account. This flag is undocumented in smbpasswd (5) manpage.
Including both characters in Perl code solves the problem.
Tested with Crypt::SmbHash version 0.12, Perl 5.8.3 on Conectiva 8 Linux.
Regards,
Alceu