bash/ldap failures

Aurélien Aptel aaptel at
Fri Mar 16 13:54:31 UTC 2018

Rowland Penny via samba-technical <samba-technical at>
> The earlier output is echoed through grep and if the return code
> isn't zero, a message is printed, 'failed doing volume command'.
> If there is an error here, it possibly isn't coming from smbclient. It
> could be wrong data in $out, an 'echo' error or a 'grep'
> error.
> What I am trying to say is, the test could fail for something that is
> nothing to do with 'smbclient'.

As I said in my previous email, the script expects the input to be
copied to the output:

The script sends "volume\nquit\n" as input to smbclient and expects this

  Try "help" to get a list of possible commands.
  smb: \> volume
  Volume: |tmp| serial number 0xad80a8b3
  smb: \> quit

But the input isnt copied to the output, so it actually gets this back:

  Try "help" to get a list of possible commands.
  smb: \> Volume: |tmp| serial number 0xad80a8b3
  smb: \> 

The pattern "^Volume" matches only the first thing, not the second but
the test is just looking for this Volume chain. The failure is

I have no idea why the input isnt copied on the output. I've tried
running this on a different machine and it passes. It could be that the
shell have different behaviours regarding eval/echo/backticks together.

Aurélien Aptel / SUSE Labs Samba Team
GPG: 1839 CB5F 9F5B FB9B AA97  8C99 03C8 A49B 521B D5D3
SUSE Linux GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 (AG Nürnberg)

More information about the samba-technical mailing list