libpam-foreground | create lockfiles describing which users own which console | Mehr ...
This PAM module creates a lockfile whenever a user logs in, specifying the username and the console. This allows software to check whether the user making a request is on the current foreground console or not.