how to login other user account with shell script

Bob Chiodini rchiodin at bellsouth.net
Mon Jul 10 10:47:35 UTC 2006


yogesh at banasdairy.coop wrote:
> hi to all
> i want the shell script that automatically login to other user account
>
>
> suppose i login as a username:yoga
> password:abcdef
>
> at prompt i make one test.sh script
>
> test.sh  //data in this file
> su root                 //want to login as a root user name
> xyzabc              //password
>
>
> so when i run this shell script the o/p like this
>
> yoga# ./test.sh
> password:
>
>
> but i want to directly login .i want to password in shell script
>
> so the o/p will come like below
>
> yoga# ./test.sh
> root#
>
> can it possible if yes than how
>
> thanks in advance
>
>   
Will sudo (man sudo) do what you want?

Bob...




More information about the fedora-list mailing list