Skip to main content
added 15 characters in body
Source Link

One thing to mention is that you should first change the file permission then try to make changes:

chmod u+w /etc/pam.d/sudo

sudo su -
chmod u+w /etc/pam.d/sudo

Adding this line at first line:

# sudo: auth account password session
auth       sufficient     pam_tid.so # << Add this here ;)
auth       sufficient     pam_smartcard.so
auth       required       pam_opendirectory.so
account    required       pam_permit.so
password   required       pam_deny.so
session    required       pam_permit.so

Then revert it back file permissions when you are done with:

chmod u-w /etc/pam.d/sudo

One thing to mention is that you should first change the file permission then try to make changes:

chmod u+w /etc/pam.d/sudo

Adding this line at first line:

# sudo: auth account password session
auth       sufficient     pam_tid.so # << Add this here ;)
auth       sufficient     pam_smartcard.so
auth       required       pam_opendirectory.so
account    required       pam_permit.so
password   required       pam_deny.so
session    required       pam_permit.so

Then revert it back file permissions when you are done with:

chmod u-w /etc/pam.d/sudo

One thing to mention is that you should first change the file permission then try to make changes:

sudo su -
chmod u+w /etc/pam.d/sudo

Adding this line at first line:

# sudo: auth account password session
auth       sufficient     pam_tid.so # << Add this here ;)
auth       sufficient     pam_smartcard.so
auth       required       pam_opendirectory.so
account    required       pam_permit.so
password   required       pam_deny.so
session    required       pam_permit.so

Then revert it back file permissions when you are done with:

chmod u-w /etc/pam.d/sudo

Source Link

One thing to mention is that you should first change the file permission then try to make changes:

chmod u+w /etc/pam.d/sudo

Adding this line at first line:

# sudo: auth account password session
auth       sufficient     pam_tid.so # << Add this here ;)
auth       sufficient     pam_smartcard.so
auth       required       pam_opendirectory.so
account    required       pam_permit.so
password   required       pam_deny.so
session    required       pam_permit.so

Then revert it back file permissions when you are done with:

chmod u-w /etc/pam.d/sudo