UGN Security Forums
My ProfileMember DirectoryLogin
Search our ForumsView our FAQView our Site Rules
View our CalendarView our Active TopicsGo to our Main Page

UGN Security Store
 

Network Sites UGN Security, The GoNix Initiative, Elite Web Gamers, Back of the Web, EveryDay Helper, VNC Web Design & Development
July
Su M Tu W Th F Sa
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 30 31
Sponsored Links
Latest Postings
Latest Reviews
Topic Options
Rate This Topic
#16947 - 06/05/03 03:51 PM Messaging all users
spectre Offline
Junior Member

Registered: 03/05/02
Posts: 56
Loc: 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.
_________________________
http://www.javaspot.net

Top
Sponsored Links
      
#16948 - 06/05/03 09:25 PM Re: Messaging all users
sinetific Offline
nobody

Registered: 03/02/02
Posts: 815
Loc: 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 10:26 PM Re: Messaging all users
pergesu Offline
UGN Elite Poster

Registered: 03/14/02
Posts: 1136
Loc: 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 10:36 PM Re: Messaging all users
Infinite Offline



Registered: 03/09/02
Posts: 1041
Loc: 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 01:53 AM Re: Messaging all users
pergesu Offline
UGN Elite Poster

Registered: 03/14/02
Posts: 1136
Loc: 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 05:56 PM Re: Messaging all users
spectre Offline
Junior Member

Registered: 03/05/02
Posts: 56
Loc: 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.
_________________________
http://www.javaspot.net

Top

Moderator:  Infinite 
Featured Member
Registered: 03/05/02
Posts: 9
Forum Stats
2145 Members
46 Forums
33155 Topics
68322 Posts

Max Online: 1567 @ 04/25/10 10:20 AM
Top Posters
UGN Security 26318
Gremelin 7192
§intå× 3255
SilentRage 1273
Ice 1146
pergesu 1136
Infinite 1041
jonconley 955
Girlie 908
unreal 860
Newest Members
Jimmie Menon, fghijk435948, Devo60, ali, lavos
2147 Registered Users
Who's Online
0 registered (), 611 Guests and 328 Spiders online.
Key: Admin, Global Mod, Mod
Latest News


Donate
  Get Firefox!
Get FireFox!