[Samba] Passing a password to smbpasswd in a script
Bill Ing
wing at qenesis.com
Mon Feb 23 16:37:57 GMT 2004
Hi there,
I'm a newbie to shell scripting and trying to hack togeter a script to
facilitate the creation of unix users as well as samba users. I'm using
tdbsam so the -w switch on smbpasswd doesn't seem to work nor apply.
Using " echo $PASSWORD | pw useradd -n $USERNAME -h 0 ", I can setup a
user and their password in one line. Pw useradd -h 0 only prompts once
for a password.
If I do " echo $ PASSWORD | smbpasswd -a $USERNAME ", I'm still getting
the usual double prompt that smbpasswd asks. I've also fiddled around
with pdbedit but with the same results.
Any advice would be most appreciated.
Thanks.
More information about the samba
mailing list