Hello *nix users,
I'm wondering if there's a way to change a user's default shell in /etc/passwd to the telnet program along with some parameters.
For instance:
user:x:1001:1001::/home/user:/usr/bin/telnet localhost 12345
The above line in the /etc/passwd file gives the following error message:
Cannot execute /usr/bin/telnet localhost 12345: No such file or directory
Simply removing the telnet parameters fixes the error message, but I want anyone signing in as the user to A) not have a shell and B) be automatically telnet'd to localhost on port 12345.
It seemed like setting the user's shell to /usr/bin/telnet localhost 12345 should have worked, but perhaps I am missing something. This seems like an ideal solution, so fixing it is preferable, but alternate solutions are welcome as well!
Any help or suggestions are appreciated!
Thanks.