Ubuntu(11.10)では /etc/sudoers というファイルがあって、*1 「新しく定義を追加する場合は /etc/sudoers.d/ 以下に書くことをオススメするよ」 的なことが書いてあります。つまり sudo するたびにパスワードを聞かれるのが鬱陶しいので NOPASSWD 属性を付けようとしたんですが、あまりにもくだらない失敗をやらかしたのでメモ。 sudoers の書式は "man sudoers" すればとても詳しく出てくるんですが、 #(シャープ記号)で始まる行はコメントなんですね。 んで、Ubuntuの場合 /etc/sudoers の末尾に #includedir /etc/sudoers.dとか書いてある。 てっきり「これをコメントアウトすれば /etc/sudoers.d の中身が有効になるのかな」と思って 行頭の # を削除してドヤ顔で sudo してみ