Thanks all for quick help
i am not allow to run sudo
.
i will try with ssh keys but problem is that i have many machines which keeps on changing so ssh key logic i need to turn dynamic so that in runtime it will add keys.
just to add more info
my script do following (explanation for need of su).
run from user 1(need to run from this user because only user 1 can detect user for target file system (i.e. user2))
su user 2
copy some content to file system where only user 2 have permission to write
file system permission 755
is ther any other way of copying with other user other than using su?