I am working on migrating an application from OpenVMS to RedHat Linux 6. The application is a green screen terminal application. The users will log into Linux via SSH and the application should automatically start but they should never have access to the shell. Once the application closes or crashes it should automatically log them out. What is the best way to approach this?
I’ve tried creating a new user with the following command.
useradd -s /sbin/nologin test
I then added ftp & to the users .bash_profile in the hope it would open the ftp console immediately and then once they quit it would log them out. However upon authentication on SSH the session is killed. Any ideas?
Why don’t you just set the application as the user’s shell? That means it is the only thing that gets run when they log in, and (barring some sort of access within the application itself) they can’t really do anything else.
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.