Re: how to login other user account with shell script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



yogesh@xxxxxxxxxxxxxxx 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...


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux