On init runlevel 3, when we type "login", it shows the login prompt and undergoes the normal login process.
I want to write a script that would do invoke the login command when certain conditions happen. So typically, on bash shell script, I tried using "login" on my script. The problem with this is that when i try to run the script, the script stops responding, and I usually have to send a CTRL+ALT+DELETE to restart.
I tried testing by writing a very simple script with just only one line:
When I run the above script, it also stops responding, and I have to go through the same process of rebooting the machine.
Is there a specific way regarding how to invoke the login command?
Any help regarding this will be appreciated.