Protect Desktop Login to Ubuntu
- Open a terminal on your Ubuntu host
- Run command: sudo apt-get install libpam-radius-auth
- Open pam_radius_auth.conf file: sudo vim /etc/pam_radius_auth.conf
- Replace the contents of the file with a single line with the following:
NOTE: Backup and Testing
It is strongly recommended to take a backup or snapshot of your host prior to performing the following steps. You may be locked out of your desktop during a misconfiguration. Keep an SSH session open while you make changes. SSH uses /etc/pam.d/sshd and is not affected by changes to /etc/pam.d/gdm-password.
Use local password AND LoginTC RADIUS Connector for authentication
Open the GDM password config file: sudo vim /etc/pam.d/gdm-password
Add the following line below @include common-auth:
The lines around @include common-auth should look like this:
This file is used by both the login screen and the lock screen, so unlocking the screen also requires LoginTC.
NOTE: Challenge Authentication Mode
We recommend setting the endpoint on the LoginTC RADIUS Connector to Challenge authentication mode, so users can enter an OTP or bypass code. This is under Endpoints > your endpoint > Client Settings > Edit. After the local password, the login screen shows the challenge message (for example "Enter an OTP or bypass code.").
NOTE: User Accounts Must Exist Locally
All usernames that are being authenticated must exist locally on the Ubuntu host with a local password, because the local password is checked before LoginTC. For example, to allow jdoe to log in, create the user with:
Users that are not shown on the login screen can log in by clicking "Not listed?" and entering the username.
OPTIONAL: BlastRADIUS Hardening
NOTE: Uninstallation
Revert changes made to /etc/pam.d/gdm-password.
