Scipt to do login

I want a script which will run in the background.
$ sh s.sh&
[1] 523

Then this script should provide input to the Login command.
$ login
login:

i.e instead of the user typing in the username and password, the script running in the background should provide the username and password assuming that the script is reading the username and password from a data file.

Can any1 tell me what this script should conatin????????

Rahul,
Not sure if you can do the following, but it should serve the purpose.

On the machine where u want to login with id userid, create a .rhosts file with a entry as follows

machinefromwheretologin userid password

then in ur script put
rlogin machinewheretologin -l userid

this will log the userid in the machinewheretologin.

If I sound confusing, see man rlogin for more help :slight_smile: