そういった際には、sudo の -A オプションと rsync の --rsync-path オプションを使うと良いようです。
まず、リモートサーバに、パスワードを標準出力に出力するスクリプトファイルを配置します(ファイルのパーミッションを厳しくするのを忘れずに)。
% cat > bin/askpass #! /bin/sh echo "{{my_password}}" % chmod 700 bin/askpass %そして、rsync を実行する際には --rsync-path オプションを使い、リモートサーバの rsync を sudo -A 経由で起動するようにすれば良いのです。
% sudo rsync -avz -e ssh \ --rsync-path='SUDO_ASKPASS=/home/remote-user/bin/askpass sudo -A rsync' \ remote-user@remote-host:remote-dir local-dir
これは簡単!
sudo -Aオプションはパスワードを記述したファイルを設置する必要があるという点でNOPASSWD同様セキュリティの懸念はありますが、使いどころを誤らなければ便利だなと思いました。
This comment has been removed by the author.
ReplyDeleteI just want to say thanks for your wonderful post, it is contain a lot of knowledge and information that i needed right now. Thanks!
ReplyDeletegiochi-delle-winx.com
michael kors handbags
ReplyDeleteair jordan pas cher
nike roshe flyknit
michael kors outlet clearance
ray-ban sunglasses
coach outlet online
coach outlet store online
michael kors purses
cheap jordans
cartier watches
louis vuitton handbags
louis vuitton outlet
cheap cartier watches
toms shoes
mont blanc
celine handbags
ray ban sunglasses
cheap jerseys
adidas yeezy
pandora jewelry
michael kors outlet
ray ban sunglasses uk
beats headphones wireless
instyler curling iron
cheap ray ban sunglasses
gucci
louis vuitton outlet
oakley sunglasses
louis vuitton outlet
kate spade handbags
mont blanc pens
cheap oakley sunglasses
abercrombie outlet
gucci handbags
vans shoes
michael kors outlet
nike nfl jerseys
michael kors outlet
michael kors outlet
toms shoes
20168.2wengdongdong
ReplyDeleteThe share your really gives us excitement. Thanks for your sharing. If you feel tired at work or study try to participate in our games to bring the most exciting feeling. Thank you!
hotmail sign in | red ball | 192.168.1.1
tungsten dan molybdenum sehingga sifatnya keras.Distributor Pipa Besi baja Schedule sch 80
ReplyDeleteDistributor besi unp baja
Supplier besi beton perwira
Harga plat kapal besi baja
Harga plat kapal besi baja
ارخص شركة نقل عفش بالمدينة المنورة
ReplyDeleteشركة نقل عفش بالقصيم
شركة نقل عفش بخميس مشيط
شركة نقل عفش بابها
شركة نقل عفش بتبوك
شركة نقل عفش بالقصيم
ReplyDeleteشركة نقل عفش بتبوك
شركة نقل عفش بابها
شركة نقل عفش بنجران
شركة نقل عفش بحائل
شركة المتحدة
ReplyDeleteدليل شركات نقل العفش
شركة نقل اثاث بالمدينة المنورة
شركة نقل اثاث بالرياض
شركة نقل اثاث بجدة
I like the post format as you create user engagement in the complete article. It seems round up of all published posts. Thanks for gauging the informative posts.
ReplyDeletecara menggugurkan kandungan
It is great to have visited your website. Thanks for sharing useful information. And also visit my website about health. God willing it will be useful too
ReplyDeletePengobatan Scabies secara Alami
Obat Penghilang Jerawat dan Bekasnya
Cara Menyembuhkan Batuk Berkepanjangan
Cara Mengobati Pengapuran Tulang
Obat Pengapuran Otak pada Anak
Cara Mengatasi Mata Bengkak
Obat Herpes Zoster
ReplyDeleteThank you for joining us. his article is very helpful
Obat Maag Alami
Obat Keputihan Alami
Cara Mengobati Hematuria
Obat Penambah Berat Badan
Cara Mengobati Penyakit Kista
Cara Mengobati Sesak Napas Alami
Cara Mengobati Penyakit Gagal Jantung
His article is very helpful at all thanks
ReplyDeleteObat Penyakit Asam Urat
Obat Mata Juling
Obat Kanker Rahim
Obat Gatal Berair di Ketiak
Cara Mengobati Sakit Pinggang
Cara Mengobati Benjolan Di Vagina
Pengobatan Alami Penyakit vertigo
Torrentsformac
ReplyDeleteA free download hub to activate, crack your softwares for windows and you mac. you can download keygen, generator and activators to crack your desired
torrentsformac.com
Hey Thanks for sharing this valuable information with us. I will come back to your site and keep sharing this information with us.
ReplyDeleteBest Regards - www.office.com/setup
www.office.com/setup
www.office.com/setup
Webroot.com/safe is a protection software solution that communicates with the cloud avoiding the hassle to manage the signature updates to deploy. for office setup visit office.com/setup
ReplyDeleteSysAppPro offers the best SAP PM Training in Gurgaon with the guide of the most skilled and very much experienced experts. Our educators are working in SAP PM and related advances for a significant number of years in driving global organizations around the globe. What makes us believed aces in this field is the way that we are obviously mindful of industry needs and we are putting forth training in a particularly viable manner.
ReplyDeleteFor More Info:- SAP PM Course in Gurgaon