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:
auth requisite
auth required readenv=1
auth required readenv=1 envfile=/etc/default/locale
auth sufficient user ingroup home
@include common-auth
auth optional
@include common-account
session required
@include common-session
session optional 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 user ingroup home
@include common-auth
auth optional

No comments: