Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 38594 - samba: rpcclient can't connect to windows share
Summary: samba: rpcclient can't connect to windows share
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo's SAMBA Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-18 05:51 UTC by Stephen Tallowitz
Modified: 2004-09-15 05:04 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephen Tallowitz 2004-01-18 05:51:00 UTC
rpcclient is part of the samba package.
The problem is this:
As soon as I issue a command, such as:
"rpcclient -c 'abortshutdown' -U Administrator \\\\192.186.2.99\\IPC$"
and after asking me for a password, it returns with an error message in the style of:
cli_full_connection: failed to connect to \\192.168.2.99\I<20> (0.0.0.0)
Cannot connect to server.  Error was NT_STATUS_UNSUCCESSFUL

the strange thing about rpcclient obviously reformatting my server string is, that it always reformats it to the length of 16 characters plus this strange "<20>". Also, this strange "<20>" is always appended to the string, so entering:
"rpcclient -c 'abortshutdown' -U Administrator \\\\TEST\\IPC$"
will return
cli_full_connection: failed to connect to \\TEST\IPC$<20> (0.0.0.0)
Cannot connect to server.  Error was NT_STATUS_UNSUCCESSFUL
note that the server string is now only 11 characters long, but the "<20>" is still appended.

What I've also done and tested.
- Several rpcclient options (such as supplying ip-address, using null session), all to no avail.
- Tested different versions of rpcclient (e.g. different versions of the samba package (samba-2.2.8a.ebuild, samba-3.0.0-r1.ebuild, samba-3.0.1-r1.ebuild)
- Tested after compiling the samba package with different kernel versions (2.4.21, 2.4.24, 2.6.0)

So when did I notice this problem? shortly after the beginning of the new year (2004). The windows client I've used it on hasn't changed in that time, and I've used rpcclient before to successfully do a remote shutdown of that windows system before. My coclusion from that is, that it is some other software somewhere in my gentoo system, that provokes this behaviour, as I'm one of those  people, who regularly updated their gentoo system (about every second day)

Reproducible: Always
Steps to Reproduce:
1. update gentoo to the latest stable system
2. emerge samba (either latest stable build or development build)
3. start rpcclient with a server-string (servername + sharename)


Actual Results:  
It always returns an error message, telling me of an unsuccessful connection
attempt.

Expected Results:  
start the rpc command at the windows client.

Portage 2.0.49-r20 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r3, 2.4.24)
=================================================================
System uname: 2.4.24 i686 Intel(R) Pentium(R) 4 Mobile CPU 1.60GHz
Gentoo Base System version 1.4.3.10p1
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -mcpu=i686 -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3/share/config /usr/share/config /usr/share/texmf/tex/generic/config/
/usr/share/texmf/tex/platex/config/ /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O2 -mcpu=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache nostrip sandbox"
GENTOO_MIRRORS="http://gentoo.oregonstate.edu
http://distro.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/overlay"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X acpi alsa apm avi berkdb bonobo cdr crypt cups encode esd foomaticdb gdbm
ggi gif gnome gpm gtk gtk2 guile imlib java jpeg kde libg++ libwww mad mikmod
motif mpeg mysql ncurses nls oggvorbis opengl pam pdflib perl png python qt
quicktime readline sdl slang snmp spell ssl svga tcltk tcpd tetex truetype x86
xml2 xmms xv zlib video_cards_radeon"
Comment 1 Donny Davies (RETIRED) gentoo-dev 2004-01-19 07:49:01 UTC
Sounds familiar to bugs being discussed on samba-technical.

I think they're including a patch for this in the next release.

Keep an eye out for this.
Comment 2 Michael Glauche (RETIRED) gentoo-dev 2004-08-26 02:35:34 UTC
any new info with later versions of samba (i.e. 3.0.6) ?
Comment 3 Christian Andreetta (RETIRED) gentoo-dev 2004-09-15 05:04:22 UTC
closing, since this result can now be obtained via 'net rpc abortshutdown -S 192.186.2.99 -U Administrator' ;-)
Reopen if needed