Raymond wrote:> Is there a method to pass a password to smbpasswd from stdin? Currently it
> appears only the user or machine name can be passed.
>
> Would like to automate the process via shell script.
>
NAME
smbpasswd - change a user's SMB password
SYNOPSIS
smbpasswd [-a] [-x] [-d] [-e] [-D debuglevel] [-n] [-r <remote
machine>] [-R <name resolve order>] [-m] [-U username[%password]] [-h]
[-s]
[-w pass] [-i] [-L] [username]
The smbpasswd suports the password as an argument.
In my shell script to automate the user creation process, I do something
like this:
echo Adding and enabling samba user $user
#
smbpasswd -a -s $user $password
smbpasswd -e $user
Hope that helps,
Regards,
--
Filipi Vianna
Laborat?rio de Mec?nica Computacional (DEMM)
Faculdade de Engenharia - PUC-RS
telefone: (51) 3320-3500 ramal: 4053