aix logon


 
Thread Tools Search this Thread
Operating Systems AIX aix logon
# 1  
Old 01-25-2009
aix logon

how do I create a script to logon to db2inst1 with a password , then issue db2 command Smilie
# 2  
Old 01-25-2009
That depends on which means to log on to the machine you want to use. You could use:

rexec/rcmd
rlogin
telnet
ssh

and perhaps some more. IMHO you should opt for some securized form of logging on (which leaves only ssh), but, depending on your environment, any other tools might equally suffice. Some of these tools have kerberized (Kerberos-aware) variants which might or might not be necessary for you (in the nowadays unlikely case you have a Kerberos domain set up).

If you could elaborate on what your requirements are we might be better able to help you. As you have asked a very general question the answer is also quite general in nature.

I hope this helps.

bakunin
# 3  
Old 01-27-2009
logon

I have a sh file... batch.sh. within the sh file I want to logon to user ID db2inst1. but I do not want to use the su command
# 4  
Old 01-27-2009
Why not the su command? You can use
Code:
su -c

to issue one command as another user.
Padow
# 5  
Old 01-27-2009
I am trying to DB2 SQL command and am having problem with the SQL... i have been using su -c db2inst1 'db2 "select ....." ' however if the SQL have '||' with the sql this seems to cause a problem
# 6  
Old 01-28-2009
create a authorized key connection from you machine to db2 server, put the public key from your source host to $HOME/.ssh/authorized_keys on the db2 Server (this is default, may be different on your system)

then try

Code:
ssh db2inst1@host << _EOF

#yoursqlstatement

_EOF

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. SCO

Openserver 5.0.5 - logon delay

We have an OpenServer 5.0.5 system that has worked forever, but I'm hearing complaints of logon delays for users now. Normally they would telnet in and the logon screen would pop up, but now it sometimes takes a minute or more, and the user must hit the enter key to get it to appear. Everything... (11 Replies)
Discussion started by: citygov
11 Replies

2. Post Here to Contact Site Administrators and Moderators

Cannot logon using elinks

There are some computers in the firm that have no GUI, so I use elinks (ELinks - Full-Featured Text WWW Browser) to access the internet. However, logging onto the unix.com forums is not possible, because the page hangs at "Thank you for logging onto the forums, " There is also a line "Please click... (6 Replies)
Discussion started by: figaro
6 Replies

3. Shell Programming and Scripting

Logon/Logoff script

I need help for writing a logon/logoff script for recording user's computer usage time. This is for local login only, not for ssh or something like that. When a user logon, there should be a temp file (/home/acct/login_temp) generated including the logname and logon time information in the... (8 Replies)
Discussion started by: jimx
8 Replies

4. Solaris

ssh logon

Hi I am envountring a problem while I login using ssh on a sun box to a remote box. I use ssh user@server and it takes long time to ask for a password.. does anyone knows the reason behind this? or is there a way that this could be solved Thanks, Antony (8 Replies)
Discussion started by: antointoronto
8 Replies

5. Shell Programming and Scripting

About Logon

hi how can I know abt the details of current user who are logged on and as well as those users who currently have an account but are not logged on? Thanks (1 Reply)
Discussion started by: nokia1100
1 Replies

6. UNIX for Dummies Questions & Answers

Logon script

Hi: I am wondering if anyone has a logon script to be put in /etc/profile or environments that will display the logged on username and path? (4 Replies)
Discussion started by: capeme
4 Replies

7. Shell Programming and Scripting

logon to ssh

Hi, I need to run a command remotely, rsh is disabled so I'm trying to do this: ssh myserver ls -lst /work/jsf The problem is that this prompts for a password and I want to do it in a shell script. How can I pass the password without user interaction? I tried "echo mypass | ssh_command" and... (1 Reply)
Discussion started by: rocky_triton
1 Replies

8. SCO

Logon Problem

Hellow, I am using SCO Unixware version 7.1.1 on a machine, when I start this machine, after logon, one message window appears " Message ! with Ok button ", when I click on Ok button it again goes to logon windows. Can somebody help me regarding this. Thanks in advance... (0 Replies)
Discussion started by: tayyabq8
0 Replies

9. UNIX for Dummies Questions & Answers

Can't logon

I stupidly changed the shell of the root user to one that does not exist, and now when I try to lgon it says it cannot find the path to my shell and will not let me proceed any further. Is there any way I can get round this without re-installing the OS? Thanks for any replies. (8 Replies)
Discussion started by: SRP
8 Replies

10. Cybersecurity

AIX logon attempts

Is it true that within AIX, logon attempts with a blocked user (password set to NP or *) are still logged in the syslog file, provided the shell of the user is /dev/null? And that if the user does not have a shell (or a shell set to /bin/false), any logon attempts with these blocked users will... (0 Replies)
Discussion started by: eysheikah
0 Replies
Login or Register to Ask a Question