Date: Tue, 11 Aug 1998 22:40:33 +0200 (SAT) From: Khetan Gajjar <khetan@link.freebsd.os.org.za> To: Ralph Strohschein <strohsr@mcmail.cis.mcmaster.ca> Cc: "Susan R. O'Brien" <srobrien@mss.lucent.com>, freebsd-questions@FreeBSD.ORG Subject: Re: Issuing the Windows NT "net" command from FreeBSD Message-ID: <Pine.BSF.3.96.980811223915.23275C-100000@link.cpt.nsc.iafrica.com> In-Reply-To: <Pine.SOL.3.96.980811144053.5810B-100000@mcmail.CIS.McMaster.CA>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 11 Aug 1998, Ralph Strohschein wrote: >If you want to receive a winpopup message from an NT box on your FreeBSD >box, I can't help you. If you want to send a popup message from your >FreeBSD box to any NT box, check out smbclient, which is part of the Samba >package. Can also be done with Samba. I wrote this privately, but seeing how many people believe it's not possible to send from a NT/95 PC to a FreeBSD box, here's the extract from smb.conf(5) : message command This specifies what command to run when the server receives a WinPopup style message. This would normally be a command that would deliver the message somehow. How this is to be done is up to your imagination. What I use is: message command = csh -c 'xedit %s;rm %s' & This delivers the message using xedit, then removes it afterwards. NOTE THAT IT IS VERY IMPORTANT THAT THIS COM- MAND RETURN IMMEDIATELY. That's why I have the & on the end. If it doesn't return immediately then your PCs may freeze when sending messages (they should recover after 30secs, hopefully). All messages are delivered as the global guest user. The command takes the standard substitutions, although %u won't work (%U may be better in this case). Apart from the standard substitutions, some additional ones apply. In particular: %s = the filename containing the message %t = the destination that the message was sent to (proba- bly the server name) %f = who the message is from You could make this command send mail, or whatever else takes your fancy. Please let me know of any really inter- esting ideas you have. Here's a way of sending the messages as mail to root: message command = /bin/mail -s 'message from %f on %m' root < %s; rm %s If you don't have a message command then the message won't be delivered and Samba will tell the sender there was an error. Unfortunately WfWg totally ignores the error code and carries on regardless, saying that the message was delivered. If you want to silently delete it then try "message com- mand = rm %s". For the really adventurous, try something like this: message command = csh -c 'csh < %s |& /usr/local/samba/bin/smbclient \ -M %m; rm %s' & this would execute the command as a script on the server, then give them the result in a WinPopup message. Note that this could cause a loop if you send a message from the server using smbclient! You better wrap the above in a script that checks for this :-) Default: no message command Example: message command = csh -c 'xedit %s;rm %s' & --- Khetan Gajjar (!kg1779) * khetan@iafrica.com ; khetan@os.org.za http://www.os.org.za/~khetan * Talk/Finger khetan@chain.freebsd.os.org.za UUNET Internet Africa Support * FreeBSD enthusiast-www2.za.freebsd.org FreeBSD: Because rebooting is for adding new hardware To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980811223915.23275C-100000>