Samba service: samba-tool user returns illegal argument

Lately I have started a project with a goal to provide:

  1. A Nix module to easily install samba as an Active Directory Controller
  2. A web app based on a React/Bootstrap frontend and a Rust Rocket backend to Administrate the Samba ADC

If this project makes any headway, I was hoping to post it as an open source project; but I have already run into some issues dealing with passwords.

The samba-tool on NixOs when run with any command or flag that triggers the user module returns an error in:
trying to use the crypt library.

If I understand the source correctly it seems that samba creates hashes for both SHA256 and SHA512 anytime the user module is run. If one of those modules is not present then it throws and illegal argument exception.

My fledgling interface can use ldap to add, modify, and delete users.
Once a user is created I cannot change the password.

I am to understand that Samba will not let you create, but only modify a password through LDAP. The initial password must be added by some other Samba interface.

Does anyone know how to install or check the installation of these crypt modules?

I still haven’t made any progress with samba-tool, but on the ldap front I found an ldif that will do what I want so now I just have to figure out how to get the rust ldap library to mimic that behavoir.