largely rewrote smbpasswd so that the code is understandable. This