How can I create an infinite login loop for a specific user?

Well I know the question is weird, but i have a user "Bob" and I want only bob's account to be stuck in infinite login loop. Please note I don't want to get out of a login loop..I want this particular user to be stuck in infinite login loop.

How do I do this?


To address bodhi's comment that the user can login through other means, open the file /etc/security/limits.conf and at the bottom add the following line

username hard maxlogins 0

The user will be able to login in tty but will be kicked out immediatelly, and lightdm (or any other login manager for that matter) will do the same. For good measure I would use this together with chowning .Xauthority


Change the shell for Bob:

sudo chsh -s /bin/false Bob