KpyM Telnet/SSH Server - Forum
security - deny command prompt |
scott k |
security - deny command prompt |
Jul 30 2010 15:58 |
|
Hi, is there a way to prevent users from the command prompt, only allow the login script to start another program? -- I know there is "break off", exit, and other tricks... but it there a solid way in kpym to deny this no matter what?
|
Kroum Grigorov |
|
Aug 06 2010 07:15 |
|
You can set your program to be the login shell, you can do that by chaging the "shell_command" parameter in kts.ini file
For example:
shell_command = "ping.exe 127.0.0.1 -t"
will set the ping command as the user shell, once the user breaks the ping command the KTS session will end
-or-
If you need to do that with a script you can change the "/K" switch of the %COMSPEC% to "/C" this will tell the command prompt to exit immediately after the script is executed
Again with the ping command:
shell_command = "%COMSPEC% /C "scripts\_test_.bat""
---------------------------------------
c:\program files\kts\scripts\_test_.bat
---------------------------------------
:start1
ping 127.0.0.1
goto start1
---------------------------------------
Once the user breaks the script the session will end.
Kroum
|
scott k |
|
Aug 06 2010 19:09 |
|
Kroum,
This is perfect, and works great, Thanks!
--Scott
|
© 2007 - 2008 Kroum Grigorov