- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Inputting password from command procedure
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2007 06:02 PM
тАО03-12-2007 06:02 PM
Inputting password from command procedure
IтАЩm a beginner to the vms operating system, and having trouble with a command procedure to run an .exe file.
The thing is whenever a program is run on the system the user is prompted to enter a username and password before the program executes.
IтАЩm having a problem inputting this data
(password) from the command procedure, is there a way for this to be done?.
And also I was wondering, is they anyway to input the username and password from the keyboard and the rest of data from the command procedure?
Sincerely,
Mark Vitalis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2007 06:24 PM
тАО03-12-2007 06:24 PM
Re: Inputting password from command procedure
Welcome to the OpenVMS ITRC Forum!
For most programs you just follow the start of the program with the data such as username password. For example
$! test.com
$run test
username
password
some data
more data
$exit
Your question implies you are concerned about putting a username/passowrd in a script. Rightly so! It woudl be best/desirable to input the password from the originating terminal, and the data from the script or the terminal as appropriate.
If the program was written to accomodate that, this is easy. Specifically the program should se tow different files/streams for the two typs of input. The password should be read from the logical name SYS$COMMAND, and the data from SYS$INPUT.
Check $HELP and USER MANUAL for details on those concepts.
However, if a program just reads from SYS$INPUT (the standard for C, Fortran and so on), then you are pretty much stuck. There is no way to redirect on the fly.
Enjoy,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2007 06:11 AM
тАО03-13-2007 06:11 AM
Re: Inputting password from command procedure
Thanks alot man, greatly appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2007 07:04 AM
тАО03-13-2007 07:04 AM
Re: Inputting password from command procedure
"And also I was wondering, is they anyway to input the username and password from the keyboard and the rest of data from the command procedure?"
You can try to put this line in your command procedure, right before you invoke the program (whose input you want to enter from the keyboard):
$ DEFINE/USER SYS$INPUT SYS$COMMAND
For example,
$ define/user sys$input sys$command
$ run myprogram !input will be from keyboard
$! program finished
$ write sys$output "Done!"
$ exit
Good luck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2007 12:44 PM
тАО03-13-2007 12:44 PM
Re: Inputting password from command procedure
Thanks for the assistance.
Sincerely,
Mark Vitalis
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2007 07:05 PM
тАО03-13-2007 07:05 PM
Re: Inputting password from command procedure
$! -----------------------------------------
$! Get the password once
$! -----------------------------------------
$!
$ SET TERM/NOECHO
$ INQUIRE PWD "Util password"
$ SET TERM/ECHO
$!
$ PIPE WRITE SYS$OUTPUT PWD | -
UTIL Param1 Param2 ...
This can be extended for multiple input lines:
$ PIPE (WRITE SYS$OUTPUT USERNAM ; -
WRITE SYS$OUTPUT PWD ; -
WRITE SYS$OUTPUT "Command" ; -
WRITE SYS$OUTPUT "EXIT") | RUN UTIL
Edwin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-13-2007 10:52 PM
тАО03-13-2007 10:52 PM
Re: Inputting password from command procedure
And you can install the image with privs so that the user itself can not read the file (w:,s:rwed) but only an installed exe (all with privs).
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-15-2007 01:18 AM
тАО03-15-2007 01:18 AM
Re: Inputting password from command procedure
you all were very helpful, really appreciate it.
Thanks