Artificial intelligent assistant

how to login a user using shell script In my computer i have two user(tiger,jenk) now i want to create a shell script for login user "jenk" from user "tiger" i m try this code [tiger@pagaltiger mytask]$ echo -e "IncorrectPassword\n" | su jenk Password: su: Authentication failure echo -e "CorrectPassword" | su jenk [tiger@pagaltiger mytask]$ then i am again login as a tiger user what's going wrong with me **I m not want to use expect**

Your best best is to set up a secure shell daemon on the system (if it's not already running) and use paswordless keypair authentication. Presuming that `sshd` is already in place, you can log in as `tiger` and run the following commands:


ssh-keygen
ssh-copy-id jenk@localhost


After that, `tiger` will be able to run a command as `jenk` with the following syntax:


ssh jenk@localhost '(some command here)'


For example:


tiger@hostname $ ssh jenk@localhost 'whoami'
jenk
tiger@hostname $

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 79595046dc11de0cbf9c1a96457c95fc