input username and password interactively


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting input username and password interactively
# 1  
Old 01-08-2011
Computer input username and password interactively

Hi guys,

I am using Solaris 10 and we install IBM OnDemand server there. there's a command called arsload that we use to load document and query document too. I need to write a script to query document but when querying document, this command prompt for username then password.
My question is how can I input the username and password in the script automatically? Any advice is very much appreciated. Thanks in advance!

regards,
Mark Thien
# 2  
Old 01-08-2011
Can you please provide us with a sampling of what you've done?
# 3  
Old 01-09-2011
Computer

Hi,

when I execute the following command:

arsdoc query -h ADMIN -f "System log" -e ";" -i

it will prompt me like below:
OnDemand Login:
and then
OnDemand Password:

I want to put this query into a shell script like below:

HTML Code:
#!/bin/sh

arsdoc query -h ADMIN -f "System log" -e ";" -i 
// auto input username here
// auto input password here
# 4  
Old 01-09-2011
arsdoc has the option to include username and password directory.

IBM DB2 Content Manager OnDemand
Code:
arsdoc query -h odserver -u admin -p imnottelling -f "Claims" -G "CLAIMSREPORTS" -i "where reportdate = 14320 and reporttype = 'CLAIMS'" -I f

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How can i su automaticaly in same server with different username and same password?

Hi I am new to shell scripting, Can you please help me in writing a script that can switch user in same server with different user name and same password. I want to perform some functional task in a particular user and need to switch user and perform same activity in another user and so on ... ... (4 Replies)
Discussion started by: Dew
4 Replies

2. Shell Programming and Scripting

Steps after username and password is entered !

Hi, I know this sounds crazy question.. but I am just curious to know what happens next when I enter username and password and hit enter on a new Unix session (using Putty)? I mean which file gets executed, how the default login shell is determined etc... regards juzz4fun (5 Replies)
Discussion started by: juzz4fun
5 Replies

3. UNIX for Dummies Questions & Answers

How do you reset username/password

Picked up a 3b2 running System V. Works fine, but it requires a username and password. Is the username "root" or "sysadm"? How do I find out and how to I reset it or bypass it? Thanks. (2 Replies)
Discussion started by: TanRuNomad
2 Replies

4. Shell Programming and Scripting

Username and password

Hi I am new to using unix and am struggling with a script i am writing. What i am trying to do is get a user to enter a username, check the original file i created with username and pin to see if their is a corresponding entry. Next ask the user to enter the pin and see if this matches... (5 Replies)
Discussion started by: somersetdan
5 Replies

5. UNIX for Dummies Questions & Answers

How can i hide username/password

hi all, i run sqlplus command on unix(HP-UX) like "sqlplus username/password@serverA @deneme.sql" but when someone run "ps -ef | grep sqlplus", it can see my username and password :( How can i hide username and password. thanx. (1 Reply)
Discussion started by: temhem
1 Replies

6. Red Hat

Trouble logging in with username and password

I have a RHEL 5 server that I can log into with an LDAP account hosted on a server running Sun DSEE 6.3 with an ssh key pair but not with my username and password. When I try to login to the console I am given the "login incorrect" message as if I fat fingered my password. Other users with... (5 Replies)
Discussion started by: ilikecows
5 Replies

7. Shell Programming and Scripting

automating username / password entry

I have a database that contains a list of server names, and the password for the root user on several servers (100+). I need to verify the passwords for each of the servers in an automated fashion because the database continues to grow. All of the users that I'm going to test are ROOT. I can't... (1 Reply)
Discussion started by: jbeck22
1 Replies

8. UNIX for Advanced & Expert Users

Copy interactively - shell input

Hello, I am making a script to copy files interactively from one directory to another using the "i" option because I dont want to overwrite the files. cp -i *.html ./../otherdir/ cp: do you want to overwrite (y/n) ? I used cp -i *.html ./../otherdir/ ans='n' read $ans ... (4 Replies)
Discussion started by: telecomics
4 Replies

9. UNIX for Dummies Questions & Answers

Zip and password protect non-interactively

I'm wondering if there is a way to zip a file and password protect it non-interactively. zip -e will prompt for a password but I don't want a prompt. This needs to be done automatically as part of a shell script. I'm using the zip command because the will be unzipped by a Windows machine. ... (1 Reply)
Discussion started by: savage66
1 Replies

10. Shell Programming and Scripting

username password in script

Can we write a script to telnet to a unix server from unix with the username and password hardcoded in the script?? something like ssh a@b -p password ??? (5 Replies)
Discussion started by: roshanjain2
5 Replies
Login or Register to Ask a Question