FreeBSD / Linux: Sending a Message to Windows Workstation with smbclient command
source:http://www.cyberciti.biz/tips/freebsd-sending-a-message-to-windows-workstation.html
by nixcraft · 4 comments
You can use utility smbclient (part of samba server) to send a message to windows system from FreeBSD (or even from Linux/Solaris/UNIX OS). This command lets you send messages to windows workstations, display browse lists, and connect to SMB shares. Genral syntax of to send a message is as follows:
smbclient -M <WINDOW-SYSTEM-NAME> <<EOF
Message
Message
...
..
...
When the message is complete, press Control-D.
Send message to Windows system from Linux/ FreeBSD
To send a message "Meeting canceled" to windows system called joyxp
$ smbclient -M joyxp <<EOF
Output:
Meeting canceled
See you at coffee house in 2 hrs.
--Vivek
EOF
With –U you can specify the username.
$ smbclient -M myxp -U VIVEK <<EOF
Meeting cancelled
See you at coffee house in 2 hrs.
EOF
This tip also works with Linux and other UNIX variant with Samba client utilities package. Read man page of smbclient for more information.
man smbclient