ぽっぺん日記@karashi.org
2007-11-04(Sun) [長年日記]
_ sudoの-Sオプション
sudoのmanを読んでいたら、こんなことが書いてあった。
-S The -S (stdin) option causes sudo to read the password from the standard input instead of the terminal device.
試しに一般ユーザ(もちろん、sudoersには登録済み)で
> echo PASSWORD | sudo ls /root
をしてみたら、ちゃんと動く。
もしかして、これでtentakelを使って、リモートでroot権限が必要な処理もこなせるかも。
あとで試そう。
[ツッコミを入れる]
[]
本日のPingbacks(全0件)
目次




まで頂ければ幸いです。