Your browser does not seem to support CSS. If images appear below, please disregard them.
It appears that you're running an Ad-Blocker. This site is monetized by Advertising and by User Donations; we ask that if you find this site helpful that you whitelist us in your Ad-Blocker, or make a Donation to help aid in operating costs.
Previous Thread
Next Thread
Print Thread
Rate This Thread
#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.

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.

#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.

#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

#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.

Sponsored Links
#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.


Member Spotlight
Gremelin
Gremelin
Portland, OR; USA
Posts: 7,195
Joined: February 2002
Show All Member Profiles 
Forum Statistics
Forums45
Topics46,798
Posts81,968
Average Daily Posts11
Members2,159
Most Online1,567
Apr 25th, 2010
Latest Postings
Top Posters(All Time)
UGN Security 39,962
Gremelin 7,195
§intå× 3,255
SilentRage 1,273
Ice 1,146
pergesu 1,136
Infinite 1,041
jonconley 955
Girlie 908
unreal 860
Top Liked Users (All Time)
§intå× Likes: 1
Cold Sunn Likes: 1
Crime Likes: 1
Cyrez Likes: 1
Ghost Likes: 1
Gremelin Likes: 4
Ice Likes: 1
unreal Likes: 1
Top Liked Users (30 Days)
Powered by UBB.threads™ PHP Forum Software 7.6.0
(Snapshot build 20160902)