i want to write to script which will login to su account without hving user interaction.( i know Super user password)
i wrote following script its also able to log into su account. but seesion gets terminates soon.
what can be done ???
or is there any other solution. i don't want to use expect tool
HOST="host ip address" # have to put host ip address
DELAY=1
Dont get you here:
If there is no user interaction then you are talking batch... in batch when execution is finished the shell exits...
If its only to not have to pass a passwd, why not just use rlogin or remsh (rsh) with .rhosts file or even better: ssh
i don't have ssh installed and cant install also. can you tell me how to use rsh with .rhosts.
actually i m writing script so that user can login to root account without entering password. like automated login.
You could even do it on the same box...(rlogin to itself...)
In root's directory you create a file calles .rhosts with per line :
<hostname> <user>
you chmod the file 400
depending of platforms you may need to add the <hostname> and ip in /etc/hosts
some configure /etc/hosts.equiv....
Start by your own account and let you remsh on another box, once youve seen how it works try to figure out the best way for you in terms of security...
Thinking of it cant you install sudo? there is an option no passwd...
I work for a software company which uses AIX and Korn shell.
I'm new to shell scripting and Unix in general, I'm trying to write a batch file or script , which pypass rlogin, typing user name, password and dialing a client remotly.
So, I've created the following
rlogin SGGORA1
input 'userid?';
type LF;
waitfor 'Password', 3 seconds : nolog;
input nodisplay 'passowrd?';
type LF;
call NESIMA
had to mention
-We don't have ssh installed
-no input found when I type which input
SGGORA1 still ask me for a user id and password.
No thats not the root password.. its the user passowrd.
I tried rlogin -l <user>, so I was able in bypassing typing the user id.. but dont know how to bypass the password one.