System information

Chapter 5. Samba management and troubleshooting 89
and max log size parameters do determine the amount of information logged and the
maximum log size.
5.5 Sending Winpopup messages
Before bringing down the server or restarting Samba, it would be helpful to send Winpopup
messages to all the clients that are connected to resources on the system. The smbclient
command syntax is:
smbclient -M <NetBIOS system name>
After running this command, type in the messages and press ^D (Control D) on a blank line to
indicate the end of the messages. Example 5-15 shows the command that produced the
messages box shown in Figure 5-2.
Example 5-15 Sending Winpopup message
[root@portal1 samba]# smbclient -M m23bzzkv
added interface ip=9.24.105.99 bcast=9.24.105.255 nmask=255.255.254.0
Got a positive name query response from 9.24.104.164 ( 9.24.104.164 )
Connected. Type your message, ending it with a Control-D
this is a test message
sent 24 bytes
Figure 5-2 Message box
To send a prepared message, use the command sequence:
cat theMessage | smbclient -M foobar
Sending a message without pressing ^D at the end is accomplished by the command
sequence:
echo “The server is going down in 5 minutes.” | smbclient -N foobar
Sending a message to all client systems using services can be done with the command
sequence:
for c in $(smbstatus -b |awk '/^[0-9]/ {print $3}'); do echo "Server will be going down
in 5 minutes" | smbclient -M $c -U 'the all powerful admin'; done
The message box displayed on each client will look similar to Figure 5-3.
Figure 5-3 Server will be going down message