jqueiroz Contributor.
Contributor.
5283 views

How to broadcast to clients from command line?

Hi, hope this is the right forum.

We have an application here, where we want this app (php) to alert users to verify assignments.

Right now, we're using SMB Messages, but we cannot find the user if he/she is logged in a machine different that the usual.

It would be perfect if we could use some command to send these messages via OES.
Labels (2)
0 Likes
11 Replies
Knowledge Partner Knowledge Partner
Knowledge Partner

Re: How to broadcast to clients from command line?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Why not send mail messages via e-mail? PHP does this very easily with its
own mail command and the user will get it no matter which computer they're
at (if they check their e-mail anyway).

Good luck.





jqueiroz wrote:
> Hi, hope this is the right forum.
>
> We have an application here, where we want this app (php) to alert
> users to verify assignments.
>
> Right now, we're using SMB Messages, but we cannot find the user if
> he/she is logged in a machine different that the usual.
>
> It would be perfect if we could use some command to send these messages
> via OES.
>
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIcBAEBAgAGBQJKFbN+AAoJEF+XTK08PnB5bHsQAM1ymffAwgH6pGj3TZDFtjxp
uJ4SUE1NJ4Z0H7IAEFW7+76NWfZTB0INFyTq5gcSHKRjhIO5SZ4O4opXVZprmNTd
K8qxTeG07KAk0WJ/vQ2jBplDBN8j2B+gwAZxooxlXP/H1YSAZWbZSxo2LoeEtYtl
pzCjpA/v1vYN/UkQumqNaP4HVQglBMV8NUMg/KkE/rwT9rDdup1lgIMOXsElE/br
BLx7k7fYKgpmD0s1f4BMrYWVTXu/KGQjvkECJMMJNfV25PaJzm/JwFY2NVIjjEy4
iawXpEAtaURTFxqEmPT/Xz7gT3jnhx30JFcq8nbhjIr6NyUJUCQrSZfTQOiUm+c5
SsRryd8zIY7VvzHM8KmTqyz9AmkUhRn/b0UdBV3ELXUqJ0FNFofU3lKovq52tga/
nLCW6TcnV7oQgr78ohxO2nLUIw1pIEO8iCzmc1Fs8BNz6+w+dz3cpGAhx91fGnDe
ye05BFOlNn7MGyUdHGpAKxra3NTnkR+3SZxBxtZCs5LrWi3GyPorqNz6zg+Ec5lR
dsd4dX5vnLcDp/8A6/DBUja4X5unFeD6muHC3ndPNChDCe7vI4Cy51Cw+4kHonSe
kAA8bofJ24TTp8Cn/XtUXRxlyTLTDpIkxqj0+wdNbOX3W5Xu7zVy+yxJrehEUmX/
motOuOGtr24NXuSdvWDa
=0rE5
-----END PGP SIGNATURE-----
0 Likes
jqueiroz Contributor.
Contributor.

Re: How to broadcast to clients from command line?

ab@novell.com;1795604 wrote:
Why not send mail messages via e-mail?


Because we want to alert them, not email them. 😉
0 Likes
Knowledge Partner Knowledge Partner
Knowledge Partner

Re: How to broadcast to clients from command line?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

What kind of alert of what type of event? If they're on a webpage you can
use PHP to generate a JavaScript alert that will show up on the webpage.
You could also tie your users into e-mail and have their e-mails go to
their phones ("alert"). You could also send appointments to users'
e-mails and then let them get alerts from their e-mail-enabled whatever
devices. Without a few more details anything is possible I suppose.

Good luck.





jqueiroz wrote:
> ab@novell.com;1795604 Wrote:
>> Why not send mail messages via e-mail?
>>

>
> Because we want to alert them, not email them. 😉
>
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIcBAEBAgAGBQJKFbc5AAoJEF+XTK08PnB5jSkQAKlAE9UtoYeNBPL2q40ufWzY
i0dObeN478O/K3qNG6hEydQIjw32/NzizKvxlYKW9Iy7RjUR2LRrycDFwW7MNOrC
7ycXa4XrI5r1/76U6aSv+TgZ1N72JRnMdWqX2VmPeOFu2LudYiyYtjl7luDLhlIJ
jbQ5WnwZmM20MWzW20y263jA5t2NBVGsfqx70E601SuohoM0TXcjoaPiIYzR1V6y
21f5idzOKtZx46lFueEqkFgvxnQwxG2rcPNJ4CqKN7JOSgmv+/2kkoC+PU6Nf23N
yrdtooV1br4YQ5x0xGD/r25QMXGJAHLt6M5aOBuaV8SP3mgGb68K8WsHKtoGjCWF
aYXTDXgC+Awx/4EWoDXbC1XdhBMb9GxsQoNplAnKDIzb6yPHuRTY17XyQ5KDwmkU
G3sqXz5L3JldF+4FM3FpIkl5s2LqCXYM3u5zbs+rPN45Ip8/zS2UeSQKe+Yhi2WG
jlZg1loMgBrQWOcX8xuKqTRJTYPViTiBY62WmD+/Aa3FBv7ZTycs8HAjt6TWq5dX
hI7HS0h/1F5ls/oRLQoVb4FuNbKGsQcpq8pbFtWwMktQ4/CUDoT5M2TZWKRj+ycN
Vch3kDEYhVZTLsq9JVussCC2D37ZNOu3CMrk5tv7bsYG7tcAoXUBvaJJesjyr6ww
Z2LYYzHSriTo1aboCBJl
=c7EC
-----END PGP SIGNATURE-----
0 Likes
jqueiroz Contributor.
Contributor.

Re: How to broadcast to clients from command line?

ab@novell.com;1795616 wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

What kind of alert of what type of event? If they're on a webpage you can
use PHP to generate a JavaScript alert that will show up on the webpage.
You could also tie your users into e-mail and have their e-mails go to
their phones ("alert"). You could also send appointments to users'
e-mails and then let them get alerts from their e-mail-enabled whatever
devices. Without a few more details anything is possible I suppose.

Good luck.


In fact, all I want to know, by now, is what is the command (if there is one) to send messages to clients, in OES/Linux.

Maybe we can discuss better ways to build this application later.
0 Likes
Knowledge Partner Knowledge Partner
Knowledge Partner

Re: How to broadcast to clients from command line?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Right, but what are your clients (in the technical sense)? Web browsers?
Computers with a Novell client? Are these alerts based on something your
users do in the system at the time they get the alert or are these alerts
to be sent at some random time when the user may be at their desk or on
the toilet?

Good luck.





jqueiroz wrote:
> ab@novell.com;1795616 Wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> What kind of alert of what type of event? If they're on a webpage you
>> can
>> use PHP to generate a JavaScript alert that will show up on the
>> webpage.
>> You could also tie your users into e-mail and have their e-mails go to
>> their phones ("alert"). You could also send appointments to users'
>> e-mails and then let them get alerts from their e-mail-enabled
>> whatever
>> devices. Without a few more details anything is possible I suppose.
>>
>> Good luck.
>>

>
> In fact, all I want to know, by now, is what is the command (if there
> is one) to send messages to clients, in OES/Linux.
>
> Maybe we can discuss better ways to build this application later.
>
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIcBAEBAgAGBQJKFbu3AAoJEF+XTK08PnB5sQ8P/1PypmRFklA2EC33JQzlJsSg
MZ3GQH9ye9WnDxFuhQNUVbdglxFaCJrtvNg42SNRRx76XHR011bo2bN99ZhDFsVk
W0Q7W27EG6kzsmUGnnfLqYX72MShw9/uzMqvfiQHDKvv/c/jtKPBpiNI6GvgwJsE
f50crCEwhAkicndFPJZSOX8vGZGoDEQPkPPWOMtlLfz9RP3Lq70ykoCDRrHDrN+A
GP90Aey3wjwCMgp74o9tcGw1uUCWzTqzQXZzDUqkfouwqChpmTvll4XinwLy0qBQ
U3HMl29Nz6Dz9vARpRuQ92CbjfEtYXyiF96n90MubjhIVDoVYyqrJpxMYigbuehr
VQX7GfIpG+UuV7I6U6o9/j7RZ2vIBJhT80Z0coRS3z6DZh7MD4cBjc5qDas+IiC9
mX1KC2KCtZgv5KiH3ifZVm4dyINzgU04FrYhuKde8RDq93+DF4K/AwiMpN3YPzUS
nJuV5lucwZLRB4yllHNxAexV2/CZqRuAETt5g8v3xv+wgZ4w8h/Cj+rclfqP0GC4
pDM19EdlZg9XephwDlZ6WPjz/G+Hz7tBY7dLpoMaiAJv8NH5MG7hK0kXjIbhrpea
5ajCg31u85/HKSIs4RBNL+4huwZwOkb0s8aB8dnVv8nibKvkhEyGjEtZRr8GEwER
WAsLB4bIICeIQxZFeWrk
=mobh
-----END PGP SIGNATURE-----
0 Likes
jqueiroz Contributor.
Contributor.

Re: How to broadcast to clients from command line?

ab@novell.com;1795627 wrote:
Right, but what are your clients (in the technical sense)? Web browsers?
Computers with a Novell client? Are these alerts based on something your
users do in the system at the time they get the alert or are these alerts
to be sent at some random time when the user may be at their desk or on
the toilet?

Good luck.


All of them are Windows XP SP2/SP3 running latest Novell Client ("Novell Client 4.91 SP5 for Windows").

I want to contact them from OES Server command line.

After that, I'll insert this command on the application script, the same way we do now with SMB.
0 Likes
Knowledge Partner Knowledge Partner
Knowledge Partner

Re: How to broadcast to clients from command line?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

All righty, now we're getting somewhere:

ncpcon send \"message 1\" `ncpcon connections list |grep abuser |cut -d" "
- -f2`

Sends a message (message 1) to the user logged in as 'abuser'. If they
are logged in multiple times it probably gets them every time. Notice
that after the message is a backtick, and another one at the end of the
command (which should all be on one line by the way). Backticks look like
single-quotes at first sometime but are actually the non-shifted version
of the tilda (~) key so keep an eye on that.

Good luck.





jqueiroz wrote:
> ab@novell.com;1795627 Wrote:
>> Right, but what are your clients (in the technical sense)? Web
>> browsers?
>> Computers with a Novell client? Are these alerts based on something
>> your
>> users do in the system at the time they get the alert or are these
>> alerts
>> to be sent at some random time when the user may be at their desk or
>> on
>> the toilet?
>>
>> Good luck.

>
> All of them are Windows XP SP2/SP3 running latest Novell Client
> ("Novell Client 4.91 SP5 for Windows").
>
> I want to contact them from OES Server command line.
>
> After that, I'll insert this command on the application script, the
> same way we do now with SMB.
>
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIcBAEBAgAGBQJKFdUDAAoJEF+XTK08PnB5FAoQALf+Nv0xbUSv9RDkjMLseaD/
KX5hJCEASPZ2miOpW2aXNJS8EfO+L265j3RKbu3gt3ZyhyRKeIIPm62F0pLtCrFe
ndbIkB6HPrnHHdFyGaeJxCua22XRjmsQXBCQCsS/lNmiLupG/ZNPuoiMDSbFcK1U
vOayrNxAX3BXYdaRRN9wny4Sy0K3v2jUuc3ftJAZiYb5efq/oeAmqn/fWx7S/mD0
H64pu+anv08w7Y6ctojc4mxzWksM4qXpNKTRodSMFJMV/qWFl73YtrUL5j0udVXL
/5nDzXd86EjuDgUgeQFn8Sxljbg9ujcrNopYpf7Csi19oG0wfVaUBfJ8mJBsTHHk
cgH114S0WofIC6UK+6ptkEt7D+xzGaYOsQThiaSR5uQv7Ashlq1jvOdgoVVhuCth
o53q82QxdNAKaJfRERde1II+U/BQ8+SUO+tPIsV4eG7ewXM8GfGZAg4fbHMzaP9N
RNN30jOYvs0KAG+aCht6uQYb55pOOyGfsDEdVhIu0vCF7xqs273YVKyy/RbX8MpN
nGoiog7ZTh/svdOTASG/fUyfAqShfncBh7ppm+UsMNuoSIEctpinBO8FrET1K3it
t8lpDyUfO8i35QtH/NUxH1jvdX+Jif4dviJ03QshUprY871vH8x8A5Ydhdx+flll
nkOpUA9aH2JWqXNhFnko
=qwo2
-----END PGP SIGNATURE-----
0 Likes
jqueiroz Contributor.
Contributor.

Re: How to broadcast to clients from command line? [Solved]

ab@novell.com;1795674 wrote:
All righty, now we're getting somewhere:

Certainly.

ncpcon send \"message 1\" `ncpcon connections list |grep abuser |cut -d" "
- -f2`

Sends a message (message 1) to the user logged in as 'abuser'. If they
are logged in multiple times it probably gets them every time. Notice
that after the message is a backtick, and another one at the end of the
command (which should all be on one line by the way). Backticks look like
single-quotes at first sometime but are actually the non-shifted version
of the tilda (~) key so keep an eye on that.

Good luck.


Allright, it did the trick. But I had to change the field in 'cut' to "-f1", so it pick the connection number, not the user DN.

And both commands demanded "sudo", as they're privative to superuser.

Now it's time to embed these commands in a shell script, so I can authorize the user that runs the web server to sudo it, and only it.

Tks for your help.
0 Likes
jqueiroz Contributor.
Contributor.

Re: How to broadcast to clients from command line?

Oh, just for reference, the final command:

sudo ncpcon send \"message text\" \
`sudo ncpcon connections list | grep user | cut -f1`
0 Likes
Knowledge Partner Knowledge Partner
Knowledge Partner

Re: How to broadcast to clients from command line?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thank-you for posting back what you found.

Good luck.





jqueiroz wrote:
> Oh, just for reference, the final command:
>
>
> Code:
> --------------------
> sudo ncpcon send \"message text\" \
> `sudo ncpcon connections list | grep user | cut -f1`
>
> --------------------
>
>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIcBAEBAgAGBQJKFfF2AAoJEF+XTK08PnB5gKQP/jXxtQ5jmf9Z6NbbHpc2W1j2
Z/hlnyZFphg0d7Yt29AO8BNTlv5ZP6Hzt1R0BJ1etVeTSv1hM3XVcjDGzt0eqkr4
VEk9ZEoMgtDLQtHkswpmdylFpo+Z6+tnrPacpfUwyytdv/SskLeSEGwMWY9zcT6H
DuOXjR8R8IuAnPSFqVvyqeYMRNF36LoH/r9fBzh8YYFgzW5+I6XZ/VOmw8Zly6H4
h8CNdxh8aGajKXfHoJ+/f8wMR/WrAoYTE1xyOPXdDwLAjGN/ec4EkO8lhZv90Ke7
S/Ku4LFjyHOGttC/p+7oC2umyevDilS/YDM2FvwIdVYAF6h/17eOkq+qTf5jXNeW
UDTdQ9PoYmq/xzVlj0gupRMofX0aHoojRGHqpOkFybdA2KJX82cDsV/xJ/rBRFAZ
KYX0fQ60z4XYF5maktjwXVLjhilJjEEFKMp7Il861X4A1PMbuiY1PTUoyEQw+osD
IvlchmXHlAAFanfgxWnvNI5A8F5RrdoIWDAfN991Ih4asLKaiP08u7KZUURMc8kX
4ggtzrFJrLC3G2tHF7Wf+LDiuJMVMEQjbnudwlzv6Cblfr27bRTeiecRuRkCWL1O
kMIDwPbja/eA+rdqGcTcrkWHtOURys6U+QZp97FB1y/0g1GbueGmi+bw3MpFvrAK
eCNes12cfkTTlyeGkXAD
=1Ykb
-----END PGP SIGNATURE-----
0 Likes
jmarton2 Absent Member.
Absent Member.

Re: How to broadcast to clients from command line?

On Thu, 21 May 2009 22:26:11 +0000, ab@novell.com wrote:

> ncpcon send \"message 1\" `ncpcon connections list |grep abuser |cut -d"
> " - -f2`


While not officially supported, of the Novell Client is installed on the
OES2 server the "nwsend" command is available to send messages as well.



--
Joe Marton
Novell Knowledge Partner
SUSE Linux Enterprise 11 is ready for action.

Joe Marton Emeritus Knowledge Partner
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.