Hello, using Samba 3.0.20, the net rcp shutdown command does not work. I use /usr/local/samba/bin/net rpc shutdown --server=MYCLIENT --user=DOMAIN_ADMIN_USER and the result I get back is [2005/09/09 18:00:15, 0, effective(0, 0), real(0, 0)] utils/net_rpc.c:rpc_init_shutdown_internals(4485) Shutdown of remote machine failed! [2005/09/09 18:00:15, 0, effective(0, 0), real(0, 0)] utils/net_rpc.c:rpc_reg_shutdown_internals(4555) Shutdown of remote machine failed! Using the old 3.0.14a rpcclient with the command rpcclient MYCLIENT -c "shutdowninit -t 15" -U DOMAIN_ADMIN_USER just works fine. I also tried granting my admin user the shutdown privilege, but it does not help either. If you need any debug logs, let me know. Client systems are XP Pro SP2.
Fixed by jerry in svn, rev 10243, and available at http://samba.org/samba/patches/net_rpc_shutdown_v1.patch
Thanks, that was fast! Will try it as soon as I have access to the machine again. ;-)
Just tested it, this one still seems to be buggy: mypdc:~/samba-3.0.20/source# /usr/local/samba/bin/net rpc shutdown --server=123.123.123.123 --user=mydomadmin -r -f -t 120 --comment="Shutting down" Password: [2005/09/16 08:56:04, 0, effective(0, 0), real(0, 0)] utils/net_rpc.c:rpc_init_shutdown_internals(4485) Shutdown of remote machine failed! [2005/09/16 08:56:04, 0, effective(0, 0), real(0, 0)] utils/net_rpc.c:rpc_reg_shutdown_internals(4555) Shutdown of remote machine failed! mypdc:~/samba-3.0.20/source# /usr/local/samba/bin/net rpc shutdown --server=123.123.123.123 --user=mydomadmin Password: [2005/09/16 08:56:24, 0, effective(0, 0), real(0, 0)] rpc_client/cli_pipe.c:rpc_api_pipe(438) cli_pipe: return critical error. Error was NT_STATUS_PIPE_BROKEN [2005/09/16 08:56:24, 0, effective(0, 0), real(0, 0)] utils/net_rpc.c:rpc_init_shutdown_internals(4485) Shutdown of remote machine failed! [2005/09/16 08:56:24, 0, effective(0, 0), real(0, 0)] utils/net_rpc.c:rpc_reg_shutdown_internals(4555) Shutdown of remote machine failed! mypdc:~/samba-3.0.20/source# /usr/local/samba/bin/net rpc shutdown --server=123.123.123.123 --user=mydomadmin Password: Could not connect to server 123.123.123.123 Now the machine *SEEMS* to have shutdown (or crashed). It is a Remote Desktop reachable system I can't reach anymore, and pinging does not work as well, but I don't have physical access at the moment. Can't wake it up via etherwake, so I guess it has crashed...
fixed the length calculations for teh shutdown comment string. Apparently Wnidows is very sensitive to this change. I'm concerned about makeing the generic sweeping change for the UNISTR4 struct. So the simple changes just for initializing the shutdown request structure is enough to get by for now. New patch posted on http://www.samba.org/samba/patches/
Will test it as soon as I have physical access to the development machine. Thanks for fixing so fast!
I'm sorry, but this still does not seem to work in my environment (Windows XP SP2 Professional, German, with all current patches applied). # /usr/local/samba/bin/net rpc shutdown --server=myclient2 --user=domadm Password: [2005/09/18 11:11:34, 0, effective(0, 0), real(0, 0)] rpc_client/cli_pipe.c:rpc_api_pipe(438) cli_pipe: return critical error. Error was NT_STATUS_PIPE_BROKEN [2005/09/18 11:11:34, 0, effective(0, 0), real(0, 0)] utils/net_rpc.c:rpc_init_shutdown_internals(4485) Shutdown of remote machine failed! [2005/09/18 11:11:34, 0, effective(0, 0), real(0, 0)] utils/net_rpc.c:rpc_reg_shutdown_internals(4555) Shutdown of remote machine failed! Shortly after that (some five to ten seconds), the machine becomes inaccessible. I only have RDP access to it, so right now I can't tell you what's on the screen. Is there any help I could provide you, e.g. debug logs, ethereal traces, etc? I have root access to the Samba machine and administrator access to the Windows client. Using the old 3.0.14a rpcclient just works fine.
Can you upload an ethereal trace (gzipped of course) of the failure with 3.0.20. and the success of 3.0.14a? Thanks.
The trace contains sensitive data (IP addresses, username, password, etc.), I guess. Can I sent it to someone of the Samba team via private mail? I don't like to have private data here in Bugzilla. ;-) Can you post the ethereal command I should use? Any special parameters?
That's fine. Just email the traces directly to me. You can use 'tcpdump -w /tmp/dump.pcap -s 0 -i eth0'
One machine seems to have killed itself completely with "Windows Logon Process has been terminated unexpectedly", the other machine was just shutdown with no error message. First tcpdump trace has been made. Have to wait for a physical poweron to make the second log and then will mail it to you.
Interesting fact: with the rpcclient command, I see the shutdown warning box with the countdown timer. With the net command, I see nothing, the system just freezes after some seconds.
Files have been mailed to you, Jerry.
I can't reproduce this using the current SAMBA_3_0. I tested against Windows {2000,XP,2003,NT4} Perhaps I sent you an incomplete patch? Could you test the latest 3.0 svn tree?
Maybe I did something wrong with patching, but let's see. ;-) Just to be safe, can you give me the correct command to checkout the version from svn you mean? Then I'll compile it and test it again.
I've just synced up the release branch. Do this to grab a checkout of the tree: svn co svn://svnanon.samba.org/samba/branches/SAMBA_3_0_RELEASE samba-3.0.20a
I just tried it, and it does NOT work, even with the svn checkout. The command I issued was /root/svn/samba-3.0.20a/source net rpc shutdown --server=myclient2 --user=domadm and the error I received some seconds (approx. 5) after entering the password was [2005/09/21 19:23:31, 0, effective(0, 0), real(0, 0)] rpc_client/cli_pipe.c:rpc_api_pipe(438) cli_pipe: return critical error. Error was NT_STATUS_PIPE_BROKEN [2005/09/21 19:23:31, 0, effective(0, 0), real(0, 0)] utils/net_rpc.c:rpc_init_shutdown_internals(4485) Shutdown of remote machine failed! [2005/09/21 19:23:31, 0, effective(0, 0), real(0, 0)] utils/net_rpc.c:rpc_reg_shutdown_internals(4555) Shutdown of remote machine failed! Jerry, maybe I have an idea. Could you try to reconstruct your problem by exactly compiling Samba as I compile? My configure command line is: ./configure --with-pam --with-pam_smbpass --with-quotas --with-sys-quotas --with-expsam=mysql --with-mysql-prefix=/usr/local/mysql --with-smbmount --with-winbind Then I do a slight modification in smbd/sesssetup.c. I know that this is security by obscurity and maybe not good, but might that be the culprit? It worked fine for 3.0.14a and all other versions below that. I change the following to lines: fstr_sprintf( lanman, "", SAMBA_VERSION_STRING); p += srvstr_push(outbuf, p, "", -1, STR_TERMINATE); thus leaving out "Samba" and "Unix" as strings. In passdb/pdb_mysql.c I have to modify #include <mysql/mysql.h> to read #include <mysql.h> but that shouldn't be the culprit. Could you just check that out for yourself and see if you can reconstruct the problem then?
Still works fine. Are you sure you are using the newly built net? $ bin/net -V Version 3.0.20a
Thanks for checking that out! It indeed is: # /root/svn/samba-3.0.20a/source/bin/net -V Version 3.0.20a What could we try next? Might my smb.conf help you? Anything I could run on Windows level?
ok. I just wondered because the command string to wrote here looked like you were relying on the PATH environment variable. (/root/svn/samba-3.0.20a/source net rpc shutdown --server=myclient2 --user=domadm). I'll go back over the traces again.
Oh, sorry, my mistake. Of course it should read /root/svn/samba-3.0.20a/source/net rpc shutdown --server=myclient2 --user=domadm with one slash after source. Thanks for investigating this so deeply. If you need any more help or information, just let me know, and I'll happily provide you with that. ;-)
ok. I've finally been able to reproduce this after getting the XP sp2 firewall fiasco fixed. 'net rpc shutdown' does in fact blue screen the xp host.
Fixed for real this time. Run 'svn up' in the 3.0.20a checkout and run 'make bin/net'
Yippieh, it works! Thanks a lot for your fast fix, Jerry! Great job! ;-)