Bug 3364 - Some messages being sent to STDERR instead of STDOUT
Summary: Some messages being sent to STDERR instead of STDOUT
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: Tools (show other bugs)
Version: 4.13.3
Hardware: Sparc Solaris
: P3 trivial (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-30 17:50 UTC by Derek Middleton (dead mail address)
Modified: 2022-08-11 04:58 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Derek Middleton (dead mail address) 2005-12-30 17:50:18 UTC
According to the documentation, by default smbclient is supposed to send all output to STDOUT.  Only when the -E parameter is included on the command line should smbclient send its output to STDERR.

However, when running the smbclient command via a script, when upgrading from a fairly ancient version to 3.0.21, I see that some messages are still being sent to STDERR even when I redirect STDOUT to /dev/null.

Here is sample output from a command I just issued.  For security reasons, I have eliminated the hostnames and path to our password file (don't want to get in trouble with the company I work for).

derek.middleton@hostname$ smbclient --version
Version 3.0.21
derek.middleton@hostname$ smbclient //winserver/simis -A xxxxx -c 'dir' > /dev/null
Domain=[US] OS=[Windows Server 2003 3790] Server=[Windows Server 2003 5.2]
derek.middleton@hostname$ smbclient //nvm0041pdv/srg -A /mis/prod/bin/scpt/samba/svc.simmis.pwd -D '/prod/00 template' -c 'get headers.txt' > /dev/null
Domain=[US] OS=[Windows Server 2003 3790] Server=[Windows Server 2003 5.2]
getting file \prod\00 template\headers.txt of size 64 as headers.txt (3.9 kb/s) (average 3.9 kb/s)
derek.middleton@hostname$

This behaivor does not break any of my scripts, but they now produce output when I believe they're not supposed to.
Comment 1 Douglas Bagnall 2022-08-11 04:58:29 UTC
See https://bugzilla.samba.org/show_bug.cgi?id=6337 for the complementary complaint (messages being sent to STDERR when they expect STDOUT).