[Samba] scripting smbpasswd not working..

Max Kipness max at kipness.com
Tue Jul 18 20:56:55 GMT 2006


>Hello all,
>
>I'm sure I can't be the only person with this question.. but I just didn't
>see it answered..
>
>how do you script smbpasswd?
>
>I've tried
>
>echo password | smbpasswd -sa name
>smbpasswd -sa name password
>
>echo password | smbpasswd -D5sa name
>(this gets me the ability to add a password by hand..)

Funny, I was just researching this myself. Found out that this is the
correct syntax, and it seems to work fine:

(echo $pass;echo $pass)|smbpasswd -s -a $user

Thanks,
Max


More information about the samba mailing list