In a mail to this list a command for shutting down a PC is mentioned, but without further explanation. It said something like this: net rpc shutdown -S <machine name> I do not get it: who shuts down who? For example, I have a samba acting as a PDC server for network with windows 2K workstaions. Users forget to shut down the ws's and I would like to do that automatically (from cron) in certain time of day. Is there a command that can be sent to a w2k workstation to shutdown? Can samba give that command? Any sugestions? Zoran -- Zoran Ovcin, Dj. Niksica Johana 26/134, Novi Sad, Yugoslavia +381-(0)21-402-422, mailto:zoran@imft.ftn.ns.ac.yu, ICQ# 51891480
On Mon, 2003-01-20 at 19:33, Zoran Ovcin wrote:>> net rpc shutdown -S <machine name>...> I do not get it: who shuts down who?...> Is there a command that can be sent to a w2k workstation to shutdown? > Can samba give that command?net rpc shutdown -S <machine name> shuts down the remote machine (workstation or server) called <machine name> You must authenticate it with a user that is known on the remote machine. So something like: net rpc shutdown -S <domain member> -U DOMAIN\Administrator%adminpw should do it.
On Wed, 2003-01-22 at 02:12, Zoran Ovcin wrote:> Sorry, but I still do not get it. Where do i type the above command? On > the Linux machoine? I do not have the 'net' command there... On the w2k > machines, (workstations) I do not have net rpc command. Maybe on the w2k > server, who is not in this story with samba...Ah, ok. "net" is part of samba 3.0 (you can get the alpha). If you only want to use net from 3.0, but still use 2.2 for everything else, that's fine. Just make bin/net from samba 3.0. This allows you to type the command on the linux box to remotely shut down the w2k machines. If you want to shut down w2k machines from other w2k machines, you need the w2k resource kit. The command on windows would be "shutdown.exe".
<sheepish> You're right. I tried it on a different XP machine, and sure enough it works. I guess I didn't know my co-worker's Administrator password after all ;-). </sheepish> Thanks, Dan On Fri, 2003-01-24 at 12:35, Jim McDonough wrote: On Thu, 2003-01-23 at 20:41, Dan Perik wrote: > > I tried it using rpcclient from Samba 2.2.x, and it worked for shutdown > a Win2k machine, but not Win XP. It would give a "result was NT code > 0x00000005" error and not work. > Nt code 5 is Access Denied. Are you absolutely sure you got the userid/pw correct? -- - Dan Perik Computer Services Department Lapilo Center New Tribes Mission - PNG