Fixed smbpasswd crash bugs found by Giulio.