19
22

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Macでsudoのパスワード聞かれるのがうざい時の対処

Last updated at Posted at 2015-10-22

Linux系だと、下記のようにユーザーをwheelグループに追加して、visudoで該当箇所のコメントアウトはずせばOK。

# ログインユーザーの所属グループを確認
$ groups

# wheelグループに追加
$ sudo gpasswd -a ユーザー名 wheel

$ groups
#  wheelが追加されていたらOK

$ sudo visudo
# %wheel ALL=(ALL) NOPASSWD: ALL  # => ここのコメントアウトをはずす

Macの場合は、グループの追加方法が違うだけ。

# ログインユーザーの所属グループを確認
$ groups

# wheelグループに追加
$ sudo dscl . -append /Groups/wheel GroupMembership ユーザー名

$ groups
#  wheelが追加されていたらOK

$ sudo visudo
# %wheel ALL=(ALL) NOPASSWD: ALL  # => ここのコメントアウトをはずす

参考資料

19
22
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
19
22

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?