[Samba] smbpasswd -s silent mode

Kevin Pate kevin at pateconsulting.com
Wed Feb 27 13:45:04 GMT 2002


I just use the autopasswd command that comes with the expect package. 
By modifying this script (replacing the spawn passwd with spawn
smbpasswd) I can get smbpasswd to run in silent mode.  The only problem
with this is that the autopasswd script won't allow you (I haven't been
successful with it) to passwd command line arguments to smbpasswd. 
Therefore, if you want to add a user called candrew with a password of
"password", just have the following 2 lines in your script:

smbpasswd -an candrew
autopasswd candrew password

Hope this helps some.

On Wed, 2002-02-27 at 03:32, Christian Barth wrote:

    > Can someone show me the syntax required to use smbpasswd in silent mode.
    > 
    > I've tried the following to add user candrew with password chris01:
    > 
    > # echo chris01 | smbpasswd -s -a candrew
    > # Mismatch - password unchanged.
    > # Unable to get new password.
    The password is needed twice. Try
    # ( echo chris01 ; echo chris01 ) | smbpasswd -s -a candrew
    
    Christian
    
    
    > 
    > Thanks,
    > Chris
    > 
    > -- 
    > To unsubscribe from this list go to the following URL and read the
    > instructions:  http://lists.samba.org/mailman/listinfo/samba
    > 
    
    
                   _(_)_                          wWWWw   _
       @@@@       (_)@(_)   vVVVv     _     @@@@  (___) _(_)_
      @@()@@ wWWWw  (_)\    (___)   _(_)_  @@()@@   Y  (_)@(_)
       @@@@  (___)     `|/    Y    (_)@(_)  @@@@   \|/   (_)\
        /      Y       \|    \|/    /(_)    \|      |/      |
     \ |     \ |/       | / \ | /  \|/       |/    \|      \|/
    jgs|//   \\|///  \\\|//\\\|/// \|///  \\\|//  \\|//  \\\|// 
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
    -- 
    To unsubscribe from this list go to the following URL and read the
    instructions:  http://lists.samba.org/mailman/listinfo/samba

Kevin Pate
RHCE / MCSE / CCNA
Pate Consulting
kevin at pateconsulting.com
www.pateconsulting.com
voice 832.237.5920
fax 832.237.5924
mobile 713.823.8845
pager 713.608.3936
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the samba mailing list