Your browser does not seem to support CSS. If images appear below, please disregard them.
toggle
February
S M T W T F S
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29
Sponsored Links
Latest Postings
Topic Options
Rate This Topic
#16947 - 06/05/03 02:51 PM Messaging all users
Joined: Mar 2002
Posts: 56
spectre Offline
Junior Member
spectre Offline
Junior Member

Joined: Mar 2002
Posts: 56
192.168.128.80
Is there a command that I could use, as root, to message all the users connected to my system? I know that if you are going to perform a shutdown (shutdown -r now message), you can message all the users telling them "hey, I am going to shutdown now". But I simply just want to be able to send a message to everyone that says "hey, I am going to turn off the internet in 15 minutes".

Yeah. I searched google, but it was all trash. Any help? Thanks.

Top
Sponsored Links
#16948 - 06/05/03 08:25 PM Re: Messaging all users
Joined: Mar 2002
Posts: 815
sinetific Offline
nobody
sinetific Offline
nobody

Joined: Mar 2002
Posts: 815
Ann Arbor
I forget how to send messages to all users

$wall or $/etc/wall (send a message to all users online)

$write user [tty] (send messge to a specific user)

$talk user [tty] (same as write)

$mesg y or n (turns messaging on or off for your user)

$who (displays who is logged on to what tty)

there are probably some more ways these are all i could think of.

Top
#16949 - 06/06/03 09:26 PM Re: Messaging all users
Joined: Mar 2002
Posts: 1,136
pergesu Offline
UGN Elite Poster
pergesu Offline
UGN Elite Poster

Joined: Mar 2002
Posts: 1,136
Pimpin the Colorizzle
Quote:

[cammie:~] pergesu% man wall
WALL(1) System General Commands Manual WALL(1)

NAME
wall - write a message to users

SYNOPSIS
wall [-g group] [file]

DESCRIPTION
Wall displays the contents of file or, by default, its standard input, on
the terminals of all currently logged in users.

Only the super-user can write on the terminals of users who have chosen
to deny messages or are using a program which automatically denies mes-
sages.

-g Send messages to users in this group. This option may be speci-
fied multiple times, and any user in any of the specified groups
will receive the message.

SEE ALSO
mesg(1), talk(1), write(1), shutdown(8)

HISTORY
A wall command appeared in Version 7 AT&T UNIX.

4th Berkeley Distribution June 6, 1993 4th Berkeley Distribution
I didn't get it to work though. Another option is writing a simple perl or shell script, that does "who", gets and parses the output, and iterates through the users and sends them messages. I don't know Perl, so I can't write it. But I'm sure it wouldn't be hard at all.

Top
#16950 - 06/06/03 09:36 PM Re: Messaging all users
Joined: Mar 2002
Posts: 1,041
Infinite Offline
UGN Elite Poster
Infinite Offline
UGN Elite Poster

Joined: Mar 2002
Posts: 1,041
Canada eh
works fine for me.

Screenshot

I'm just to retarded to remember the -g before I specify a group to send to

Infinite

Top
#16951 - 06/07/03 12:53 AM Re: Messaging all users
Joined: Mar 2002
Posts: 1,136
pergesu Offline
UGN Elite Poster
pergesu Offline
UGN Elite Poster

Joined: Mar 2002
Posts: 1,136
Pimpin the Colorizzle
I got it too. On OS X you're supposed to specify a file on the command line. If you want it from the standard input, just hit enter, then type in all the text on one or several new lines, and hit ctrl+d.

Top
#16952 - 06/07/03 04:56 PM Re: Messaging all users
Joined: Mar 2002
Posts: 56
spectre Offline
Junior Member
spectre Offline
Junior Member

Joined: Mar 2002
Posts: 56
192.168.128.80
Tahnks for the info. I couldn't figure out for the life of me on how to do it. This works perfectly.

Top

Member Spotlight
Gremelin

Gremelin
Portland, OR; USA
Posts: 7,194
Joined: February 2002
Show All Member Profiles 
Forum Statistics
Forums46
Topics43,885
Posts79,059
Members2,157
Most Online1,567
Apr 25th, 2010
Top Posters(All Time)
UGN Security 37,048
Gremelin 7,194
§intå× 3,255
SilentRage 1,273
Ice 1,146
pergesu 1,136
Infinite 1,041
jonconley 955
Girlie 908
unreal 860
Newest Members
Herbert_Sherbert, codemauve, Lillysdragon1984, Brewwit, boa
2157 Registered Users
Who's Online Now
0 registered members (), 0 guests and 0 spiders.
Latest News