[Samba] Timing in a script

Michal Dobroczynski michal.dobroczynski at gmail.com
Fri May 15 14:20:20 GMT 2009

2009/5/15 Volker Lendecke <Volker.Lendecke at sernet.de>:
> On Fri, May 15, 2009 at 07:13:42AM -0700, Pete Clapham wrote:
>> Hi, all --
>> I am trying to write a script in which I can add users and their samba passwords easily and quickly.  It looks something like:
>>    useradd -c "User Name" -g groupname -p unixpassword accountname
>>    echo -e "smbpassword\nsmbpassword\n" | pdbedit -a -t -u accountname
>> If
>> I type the lines from the keyboard, it works fine.  However, when I try
>> to execute the script, the pdbedit on the second line reports that
>> there's no unix accountname to apply to samba.  I assume that this is
>> because the useradd process hasn't finished when the pdbedit is
>> executed.
> nscd?

But nscd should answer properly - in other words - you should get
b0rken answer when nscd's db is corrupted? Can you please correct me
if I'm wrong...


> Volker
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba

More information about the samba mailing list