Howto Setup Passwordless Atuhentication on GDM using PAM

Using PAM you can modify GDM authentication method not to ask for password at login. From security perspective this is not really advised, but when you share your workstation with your children or other family member it could be useful.

This howto modifies GDM and gnome-screensaver PAM modules to allow authenticate specified users without password.

Firstly, create a group whose members will be able to log on without password. My group name is home, so type the following command to make a new group and also add some members:
sudo addgroup home
sudo adduser user1 home
sudo adduser user2 home
Modify your /etc/pam.d/gdm:
#%PAM-1.0
auth requisite pam_nologin.so
auth required pam_env.so readenv=1
auth required pam_env.so readenv=1 envfile=/etc/default/locale
auth sufficient pam_succeed_if.so user ingroup home
@include common-auth
auth optional pam_gnome_keyring.so
@include common-account
session required pam_limits.so
@include common-session
session optional pam_gnome_keyring.so auto_start
@include common-password

Also add this line into your /etc/pam.d/gnome-screensaver (in this case the screen saver will not lock the user's screen when you switch between users, after suspend, etc...):
auth sufficient pam_succeed_if.so user ingroup home
@include common-auth
auth optional pam_gnome_keyring.so

No comments: