Bug 7552 - 'smbclient' always gives out the server banner
Summary: 'smbclient' always gives out the server banner
Status: NEW
Alias: None
Product: Samba 3.5
Classification: Unclassified
Component: SMB2 (show other bugs)
Version: 3.5.4
Hardware: Other Linux
: P3 normal
Target Milestone: ---
Assignee: Jeremy Allison
QA Contact: Samba QA Contact
Depends on:
Reported: 2010-07-05 12:21 UTC by Enrico Scholz
Modified: 2010-07-06 09:30 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Enrico Scholz 2010-07-05 12:21:02 UTC
smbclients outputs always the server banner:

| $ smbclient -d0 -k //cricetus/test3 -c 'ls' > /dev/null 
| Domain=[XXXXXXXXXXXXXX.DE] OS=[Unix] Server=[Samba 3.0.33-3.28.el5]

That's bad because it makes difficult to write cronjobs which shall be quiet on successful operations and return error messages on problems.
Comment 1 Björn Jacke 2010-07-06 08:23:11 UTC
this alone wouldn't help you very much for cron jobs. smbclient does not write things like

NT_STATUS_NO_SUCH_FILE listing \file_that_does_not_exist

on stderr. Also a failing -c "command" doesn't result in smbclient setting return code != 0. I'm not sure if this is actually desired to be so.
Comment 2 Enrico Scholz 2010-07-06 09:30:41 UTC
yes; I filed some other reports (e.g. the return code == 0 on failures is bug #7551).  Good catch about the output of error messages on stdout instead of stderr.