I am trying to write a script using "echo mypassword | passwd --stdin adminuser" but it does not work..? any fixes..! thanks!
Not sure if this is samba related at all, maybe you are looking for hints how to configure PAM with samba/winbind. Please have a look at the various Howtos or better look into the documentation of your linux distribution.