在Debian中,省略su命令的密码输入

我将在下面提供一种方法,用于在终端上从普通用户切换到root用户时省略输入密码的麻烦。
请以超级用户身份进行操作。

执行以下命令

 groupadd wheel
 adduser user wheel
 adduser root wheel

编辑/etc/pam.d/su

# Uncomment the following line to implicitly trust users in the "wheel" group.
#auth            sufficient      pam_wheel.so trust use_uid

(こうなってるのを、下の一行をアンコメントする)

# Uncomment the following line to implicitly trust users in the "wheel" group.
auth            sufficient      pam_wheel.so trust use_uid |