I login to linux using my Id eg "A". then i'll sudo to the user 'B' without entering the password, after that i'll copy some files from X folder to Y Folder using the SUdo user 'B'.
I am trying to do this activity with a shell script to put it in the cronjob... so far no luck.
Any help on this will be really appreicate...
this is what i am trying...
#!/bin/sh
sudo /usr/local/sbin/deploy
cp -r /tmp/test /tmp/deploy
/tmp/deploy
?