«前の日記(2007-11-03(Sat)) 最新 次の日記(2007-11-05(Mon))» 編集

ぽっぺん日記@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件)

«前の日記(2007-11-03(Sat)) 最新 次の日記(2007-11-05(Mon))» 編集