Find the answer to your Linux question:
Results 1 to 8 of 8
Hello, I want to pass MSG to all users who are logged to system That mean whenever system is going for reboot then every user must get msg before that ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2005
    Posts
    24

    How to pass msg to user in network ?


    Hello,
    I want to pass MSG to all users who are logged to system
    That mean whenever system is going for reboot then every user must get msg before that ple help me give me example..
    1) Where i want to msg. file?
    2) Where I want to put?
    3) Where I want to put links?
    Clear me I am confuse.. Help me out..
    Mahesh

  2. #2
    Linux Enthusiast
    Join Date
    Jan 2005
    Posts
    575
    Check the man page for shutdown (and perhaps wall).

  3. #3
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682
    Quote Originally Posted by Santa's little helper
    Check the man page for shutdown (and perhaps wall).
    Yeah...wall would probably be the best for what is being asked. Shutdown does, however, just print to all terminals, not just those logged in (I believe...). That can be accomplished by sending text to /dev/pts* and /dev/tty*.
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  4. #4
    Linux User
    Join Date
    Oct 2004
    Location
    Serbia&Montenegro
    Posts
    281
    I think wall is the best for that.
    Linux registered user #358842
    Human knowledge belongs to the world.

  5. #5
    Linux Enthusiast
    Join Date
    Jan 2005
    Posts
    575
    My concern regarding wall is whether users who have set their mesg permissions
    to no will receive it.It ought to be that if the sender is root they would receive
    it but the man page doesn't say so.

  6. #6
    Linux Guru sarumont's Avatar
    Join Date
    Apr 2003
    Location
    /dev/urandom
    Posts
    3,682
    Quote Originally Posted by Santa's little helper
    My concern regarding wall is whether users who have set their mesg permissions
    to no will receive it.It ought to be that if the sender is root they would receive
    it but the man page doesn't say so.
    After experimenting, root's walls go through, reguardless of your mesg setting. Also, people logged in under the same username go through (any message I wall as sarumont hits all terminals where sarumont is logged in even with mesg=n).
    "Time is an illusion. Lunchtime, doubly so."
    ~Douglas Adams, The Hitchhiker's Guide to the Galaxy

  7. #7
    Linux Enthusiast
    Join Date
    Jan 2005
    Posts
    575
    I guess the man page needs some revision then.
    Also, people logged in under the same username go through (any message I wall as sarumont hits all terminals where sarumont is logged in even with mesg=n).
    Cool.That's a nice little detail to know.
    I'm sure someone could write a nice little split personality thriller/horror story
    based around something like that

  8. #8
    scm
    scm is offline
    Linux Engineer
    Join Date
    Feb 2005
    Posts
    1,044
    Quote Originally Posted by sarumont
    Quote Originally Posted by Santa's little helper
    My concern regarding wall is whether users who have set their mesg permissions
    to no will receive it.It ought to be that if the sender is root they would receive
    it but the man page doesn't say so.
    After experimenting, root's walls go through, reguardless of your mesg setting. Also, people logged in under the same username go through (any message I wall as sarumont hits all terminals where sarumont is logged in even with mesg=n).
    That's because mesg=n just turns off write permission on your terminal device file. Obviously, root can do anything to (almost) any file (that's what make it the superuser!).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •