[Samba] Trouble doing a remote shutdown of a linux machine
Adam Tauno Williams
awilliam at whitemice.org
Wed Nov 8 11:42:08 GMT 2006
On Tue, 2006-11-07 at 22:30 -0500, Tom wrote:
> Is it possible to shutdown a Linux computer through Samba using the
> shutdown command in Windows XP and 2003? I've tried:
> shutdown /r /m hostname
> This doesn't work and results in Windows reporting "The remote procedure
> call failed.' in the command window. The Samba log shows the following:
Have you set the "shutdown script" and "abort shutdown script"
directives in your Samba configuration?
abort shutdown script = /sbin/shutdown -c
shutdown script = shutdown script = /etc/samba/shutdown.sh %z %t %r %f
# %z - Message = $1
# %t - Seconds before shutdown starts = $2
# %r - Reboot switch (-r) = $3
# %f - Force switch (-f) = $4
/sbin/shutdown $3 $4 +$time $1 &
This is all in the smb.conf manual page.
More information about the samba