"smbclient -p <port>" appears to be broken in Samba 2.x

Pete Peterson petersonp at genrad.com
Sun Jul 16 17:35:28 GMT 2000


I posted this problem as a question to this list a while ago and got no
reply.  I submitted it as a bug, but found that "samba-bugs at samba.org",
no longer accepts bug reports, even though the web page says to send them
to that address.

Wondering if the option had been intentionally discontinuted without
updating the man page, I made a quick check of the source and found that
the "-p <port>" option is still processed in "client.c".  I was hoping that
there would be a patch available, so I don't have to try to debug it
myself.

Here again is the description of the problem:
************************************************************

It appears that "smbclient -p <portnumber>" doesn't work as advertised in
Samba 2.x.  On both Linux 6.2 and Solaris 2.6, independent of firewalls and
the like, it works with old Samba (e.g. 1.9.18p10) , but not with new Samba
(e.g. 2.0.7).  The new version seems to *IGNORE* the port specification and
stubbornly attempt to connect to port 139.

Here's the result when I try to send a popup message to one of my machines
at home.  Note that MediaOne blocks the standard NETBIOS ports, so I've
chosen a couple other ports.  I send the message to port $LINPOP or $NTPOP
and my gateway redirects it to port 139 on my Linux machine or my NT
machine respectively.

Here are two tests from the same Solaris machine, first with the current
Samba and second with the 1.19.18p10 version.
--------------------
seadog> echo 'some message to home machine' | /opt/samba/bin/smbclient -p $LINPO
P -I hashbang.dhs.org -M petep
timeout connecting to 24.147.30.33:139
Connection to petep failed
--------------------
Note that smbclient tried to connect to port 139, not port $LINPOP.


With the old Samba, it works as advertised in the man page:
--------------------
seadog> echo 'other message to my home machine' | /usr/local/smbclient -p $LINPO
P -I hashbang.dhs.org -M petep
Connected. Type your message, ending it with a Control-D
sent 34 bytes (status was 0-0)
--------------------

I get the same results on Linux versions: the 1.9.xx versions work; the
2.0.x versions ignore the port specification.

This appears to be a bug, rather than an out-of-date man page or a
misunderstanding on my part, though if it's the latter, that's much easier
to fix. :-)


        pete peterson
        GenRad, Inc.
        7 Technology Park Drive
        Westford, MA 01886-0033

        petersonp at genrad.com or rep at genrad.com
        +1-978-589-7478 (GenRad);  +1-978-256-5829 (Home: Chelmsford, MA)
        +1-978-589-2088 (Closest FAX); +1-978-589-7007 (Main GenRad FAX)
 


More information about the samba mailing list