[Samba] Simple question regarding smbpasswd

Ryan Novosielski novosirj at umdnj.edu
Mon May 11 21:03:21 GMT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Markey wrote:
> On Mon, 11 May 2009 10:36:49 -0700 (PDT), Pete Clapham
> <peteclapham at sbcglobal.net> wrote:
>> Hi, all --
>>
>> I want to add SMB passwords using a script.  It would appear that some
>> variant on the following:
>>
>> smbpasswd -a -s <newusername>
>>
>> would work.  However, the syntax of the -s option isn't clear.  How do
> I
>> insert the password of the new user into the script?
>>
>> Thanks for your help.
>>
>> cheers,
>> pete
> 
> 
> echo -e "newpassword\nnewpassword\n" | smbpasswd -a -s dmarkey

It's essentially the same format that you'd use on the command line if
you were a user, but without the visual prompts.

- --
 ---- _  _ _  _ ___  _  _  _
 |Y#| |  | |\/| |  \ |\ |  | |Ryan Novosielski - Systems Programmer II
 |$&| |__| |  | |__/ | \| _| |novosirj at umdnj.edu - 973/972.0922 (2-0922)
 \__/ Univ. of Med. and Dent.|IST/CST - NJMS Medical Science Bldg - C630
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkoIkpkACgkQmb+gadEcsb4mYwCffJKEWy5fBYSars6dfwg2Z+oB
0+cAmwW2pIQyRjTxD9jzsfCc795WD03v
=h8O8
-----END PGP SIGNATURE-----


More information about the samba mailing list