smbsend (1)

Samba-TNG

7 Oct 2003

NAME

smbsend - Send SMB ("WinPopup") messages to remote computers

SYNOPSIS

smbsend [-F from] [-T to] [-m message] [-f file] [-s smb.conf] [-R resolve order] [-d debug] [-i scope] [-n sender] (host|user)...

DESCRIPTION

smbsend sends a SMB (also known as "WinPopup") message to one or more remote computers. These are text messages that show up in pop-up dialog windows, if a remote computer is running Windows NT, 2000, XP, or 2003, or (if configured appropriately) Windows95/98/Me. Samba and Samba-TNG can receive SMB messages as well, if so configured. This is the equivalent to Microsoft's NET SEND command, but a lot more powerful.

In the simplest usage, type smbsend host to send a message to a computer named HOST. It will prompt for the message, or accept standard input noninteractively.

OPTIONS

-F from
Sets the "sender" field of the message packet. This shows up as the "from" part of "Message from [someone] to [someone]" in the Windows dialog box. Default is the local machine name, as in Windows NET SEND.

-T to
Sets the "receiver" field of the message packet. This shows up as the "to" part of the "Message from [someone] to [someone]" in the Windows dialog box. Default is the remote computer or username you are sending the message to, as in Windows NET SEND.

-m message
Specifies the message text; note that if this text has spaces or metacharacters, it must be quoted to protect it from the shell; smbsend must see it as only a single argument. This is a convenience option, equivalent to piping an echo statement into smbsend (except for the trailing newline generated by echo), but a bit less awkward. Mutually exclusive with -f.

-f file
Specify an input file for the message text. By default, the message is input from stdin, either interactively or not. Mutually exclusive with -m.

hosts | users
The list of destinations to send a message. You must have at least one of these. You may specify either NetBIOS hostnames, or names of logged-in users, since most Windows releases will listen for SMB messages under both identifiers. Note that in the case where the same user is logged in to multiple hosts, specifying the username here will only send to the first such host found.

In case of ambiguity between a hostname and username that are the same, Windows 2000 and above also listen as the NetBIOS name HOSTNAME$, so you may specify that instead. (Be sure to escape the $ from the shell.) There is, unfortunately, no similar trick for disambiguating a username from a hostname.

There are a few advanced options as well; these are not typically needed, and exist mainly for completeness and consistency with smbclient(1).

-s smb.conf
Specify an alternate smb.conf file. This file is read to obtain defaults for networking options, the sender NetBIOS name, and so forth.

-R resolve order
Override the name resolve order for NetBIOS names. See the name resolve order parameter in smb.conf(5) for syntax and allowed values.

-d debug
Override the debug specification from smb.conf. This can be a simple number for a "debug level", or a more complex string. See the debug level documentation in smb.conf(5) for syntax and allowed values.

-i scope
Set a NetBIOS scope. Scopes were a primitive way to partition the global NetBIOS namespace, never very common and almost nonexistent today.

-n sender
Override the NetBIOS sender name. This option differs from -F in that the latter is the sender name specified inside the SMB "message" packet (which is what shows up in the Windows dialog box), whereas -n specifies the sender name used at the NetBIOS level to make the connection.

BUGS

Not really a bug, but in the case of multiple message destinations, smbsend really should parallelize itself. As it is, it can take quite a bit longer that would be strictly necessary.

VERSION

Last revised for Samba-TNG 0.4.

SEE ALSO

smb.conf(5), smbclient(1)

AUTHOR

Peter Samuelson.