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"
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.
any new info with later versions of samba (i.e. 3.0.6) ?
closing, since this result can now be obtained via 'net rpc abortshutdown -S 192.186.2.99 -U Administrator' ;-) Reopen if needed