LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-29-2003, 02:59 AM   #1
vrsic
LQ Newbie
 
Registered: Oct 2003
Posts: 9

Rep: Reputation: 0
Question Receiving winpopup broadcast messages


Hello!

I would like to receive winpopup messages from Wintendo boxes which are send to group (domain). Is there any possibilities? Alternatively is there any Win program which could forward messages directly to Linux box?


DarkO
 
Old 10-29-2003, 04:09 AM   #2
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
www.littleigloo.org - Linpopup
I don't know if it works with broadcast messages (but I think it does).

Håkan
 
Old 10-29-2003, 07:00 AM   #3
vrsic
LQ Newbie
 
Registered: Oct 2003
Posts: 9

Original Poster
Rep: Reputation: 0
Anything for CLI?


DarkO
 
Old 10-29-2003, 07:27 AM   #4
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
Check this: http://samba.linuxbe.org/en/samba/config/advanced.html
You could tail the log (using tail or xrootconsole which is pretty cool). Set it up to echo the messages to a log that you have created (like /var/log/smb_messages or whatever) and tail that one so you won't have a lot of other console messages in the log.

I wouldn't use the ">" operator, but rather ">>" instead so the messages get appended to it. And of course, don't delete the log if you do this.

Håkan
 
Old 10-29-2003, 07:33 AM   #5
vrsic
LQ Newbie
 
Registered: Oct 2003
Posts: 9

Original Poster
Rep: Reputation: 0
Thank you very much for your interesting solutions. The problem with Samba is that it doesn't catch the broadcast messages, just messages send to this particular machine :-(


DarkO
 
Old 10-29-2003, 07:49 AM   #6
yapp
Member
 
Registered: Apr 2003
Location: Netherlands
Distribution: SuSE (before: Gentoo, Slackware)
Posts: 613

Rep: Reputation: 30
well, how are broadcast messages received by windows?

I'm really curious whether they are picked up by the netbios deamon (nmbd), or the samba daemon (smbd).

maybe you're not running the nmbd program? (but I'm curious what that program is used for too btw)
 
Old 10-29-2003, 08:04 AM   #7
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
Sorry, I wasn't aware of that.
I haven't investigated the broadcast net send issue, but a quick search on groups.google.com seems to verify what you say. Does it apply to Samba 3.0 as well? If you're running a 2.x version it might be an idea to try an upgrade, or at least read the mailing Samba lists on differences between 2.x and 3.0.

Håkan
 
Old 10-29-2003, 08:14 AM   #8
vrsic
LQ Newbie
 
Registered: Oct 2003
Posts: 9

Original Poster
Rep: Reputation: 0
I was thinking in that direction too (Samba 3.0), I have to try it!
Thanks for the answers.


DarkO
 
Old 10-30-2003, 02:31 AM   #9
yapp
Member
 
Registered: Apr 2003
Location: Netherlands
Distribution: SuSE (before: Gentoo, Slackware)
Posts: 613

Rep: Reputation: 30
Yesterday I've been experimenting with the "message command" line, but there is something you should be aware of.

That example writes a message to /dev/console, but this node is protected against writing (off course). If you've tried that example, you might believe the samba message didn't work.

I've solved this with 'sudo'. (type visudo)
Code:
Cmnd_Alias  WINPOPUP = /opt/sbin/winpopup.sh

samba           your_hostname = NOPASSWD: WINPOPUP
And this line in /etc/samba/smb.conf:
Code:
message command = sudo -b /opt/sbin/winpopup.sh %m %s
If anything fails, you should see it in the samba log files.


edit:I've found 2 problems in the script that the example provides:
* the script doesn't stop when an error occurs
* the "cat $1" should be changed into "cat $2"

Here is my version:
Code:
#!/bin/sh

set -e

# Parameter 1 ($1) is the name of the machine sending the WinPopUp message
# Parameter 2 ($2) is the name of the file containing the message.

if [ -z "$1" -o -z "$2" ]; then
  echo "Usage: $0 'user' 'temp-message-file'" >&2
  exit 1
fi
if [ ! -e "$2" ]; then
  echo "$0: Can't open $2" >&2
  exit 1
fi

# Write the message to the console
echo "" > /dev/console
echo "Message from $1" > /dev/console
cat $2 > /dev/console
echo "" >/dev/console

# Delete the file with the message
rm $2
I'd been testing this script locally only, but it seams to work.
When I open a virtual terminal, and type "smbclient -M myhostname", or "echo message | smbclient -M myhostname", the message appears at the console

Last edited by yapp; 10-30-2003 at 02:37 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh console broadcast messages time112852 Linux - Software 2 11-23-2005 02:45 PM
Telnet Connections and broadcast messages CatSC Linux - Security 4 12-20-2004 11:53 PM
error receiving winpopup(net send) messages on my Fedora Core 1 vanquisher Linux - Software 0 02-01-2004 01:27 AM
WinPopUp messages sorrodos Linux - Software 0 07-31-2003 11:32 AM
Receiving Messages from 'root' Account DavidMD Linux - Newbie 2 06-12-2003 08:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration