Name: Asaf Karagila Date: November 20, 2004 at 11:28:04 Pacific Subject: DEFINE SYS$OUTPUT problem OS: OpenVMS 6.2 CPU/Ram: AlphaServer 800/512Mb SDR
Comment:
I've got an OpenVMS system which i admin, i am trying to write a memo system to remind me of forgotten tasks. to notify the user i am doing the next process: if user is not online (interactive logon), send it by mail, if user IS online, use F$GETJPI(PID,"TERMINAL") then DEFINE SYS$OUTPUT to that terminal, write sys$output the memo, and cycle between the user interactive logons, it works great when i run the script with a @, but when it goes on a queue, and runs in batch, although it finds the interactives it won't send the memo to them.
I suggest that you take a look at the HELP text for the REPLY under the /USERNAME option.
The terminal that is owned by another user's process will effectively attached to that terminal, and generally unavailable. From a program, there are ways to generate a write that will break-through, but the easiest way to to this is to use REPLY/USERNAME. You will need the OPER privilege (as documented) to use this command.
I hope that the above is helpful.
- Bob Gezelter, http://www.rlgsc.com The OpenVMS Consultant, OpenVMS.org; http://www.OpenVMS.org
well, i know that one, but the thing is, REPLY/USER='user' would be ok for 1 line, or 2, my problem is that most of the memos have 4-5 lines. MINIMUM. thus, it looks pretty ugly, like, $ REPLY FROM ASAF: MEMO LINE1
$ REPLY FROM ASAF: MEMO LINE2
$
and so on until the memo is sent. i don't want that. thanks for the offer though.
I would suggest to send an e-mail, regardless the user being online or not. If user is online, he'll be notified new mail has arrived. You could also use REPLY/USER to notify him, and that details can be found in an e-mail message. Drawback may be, as Bob suggested, DISNEWMAIL or NOBROADCAST settings of the terminal.
well, here's the thing, the system i admin is a military system, we have no access to the outer networks due to security reasons. i do have OPER privileges as i am the operator. i contemplated using the mail regardless being online or not, but it's not a good idea, seeing how sometimes i (or someone else) is running something interactively and cannot be paused to check the mail. so writing it on screen would be the best. the drawbacks you suggested are impossible for us, we need to know about mail, and no one knows how to disable those things, and no one will know since no one really want to disable the broadcasting of new mails alerts.
anyway, i'll remember the SHARE privileges, i'll try to enforce the processes to have a /share note.
thanks for the help, any other tips would be welcomed, i'll let you know tomorrow how it worked out.
well, thanks everyone, the set proc/priv=share is working great! if i'll remember (hey! i've got a memo system working now..) i will copy that code on a floppy and post it up here (if anyone wishes..)
Actually, you probably want to minimize the privileges floating around.
I suggest that you consider making this application a small image (in pick your favorite language), rather than DCL.
If it is an actual image, then you can install the image with the SHARE privilege, rather than requiring the user to have the SHARE privilege enabled for all of the images they run.
It is also a good idea to create a Rights Identifier specifically for the purpose of enabling that application. Then, you can install the file with the SHARE privilege (as I mentioned earlier), and protect the executable file itself so that only those users holding the Rights Identifier can access the executable. You can also check for the executable from within the application, providing a further security check.
These steps will go a long way toward satisfying the inevitable security audit, which should, if done properly, have problems with privileges other than NETMBX and TMPMBX.
For details on some security-related issues, see some of my presentations on the subject, which can be found via http://www.rlgsc.com/presentations.html.
- Bob Gezelter, http://www.rlgsc.com Editor, The OpenVMS Consultant, http://www.OpenVMS.org
well, Bob, as i mentioned earlier, this is an army system. due to that we don't have a compiler. i'm using my limited resources of DCL, and those too, are the ones i learnt from HELP and other people's scripts.
as well, the Memo system is meant for opers only, we have a subsystem within the VMS that everyone else work with, they have no access to DCL. another thing is that the re-submitting uses /user=asaf qualifier, so the daemon itself only runs as my user, and in order to add a memo i've added a global symbol ADD_MEMO that runs a small code that creates a unique memo file with the memo text.. no one is actually touching the daemon.
thanks for the advice. someday, i will have OpenVMS at home, and i will do that :) (for myself.)
The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE