Generally in the client/server communication the password sent from client to server is not encrypted. The client sends password as normal text. The server encrypts password only to store them in a file - example in Samaba Server the password can be encrypted or normal text.
Special provision can be made in client to encrypt the password and send the encrypted password to server; the same should be supported by the server to compare the password. The encrypt/decrypt algorithm in both client and server should be same.