Re: AIX $SHELL variable and Fourgen Screens
Posted in 1994
Steve Morrow (smorrow@dotrisc.cfr.usf.edu) wrote: : We've got an application (written in 4gen Screen) that we want invoked : immediately when a user signs on, and we don't want that user to have : access to the shell (ie, UNIX command line). Steve, why don't you just put the call to the initial 4gen program at the end of the ".profile"-script? That way, the user also always lands in the application after logging in. Don't forget to add an "exit" statement after the program call. In some circumstances, I've found that adding a couple of "exit" lines makes this approach even safer, but I don't know why. Another alternative is to "exec" the program, but that can also mean that you loose your ability to run sub-programs, depending on your UNIX implementation. I wouldn't mess with the "$SHELL"-Variable, nor would I use the approach that was suggested someone else, entering the application name in place of the login shell in /etc/password. That way, there can never be a shell to execute a sub-program via the "RUN" command. Also, how would you be able to set the environment variables you might need (such as DBPRINT, DBDATE, DBPATH etc.)? Hope this helps, Richard -- +----------------------------+-------------------------------------------+ | Dr. Richard Spitz | INTERNET: spitz@ana.med.uni-muenchen.de | | EDV-Gruppe Anaesthesie | Tel : +49-89-7095-3421 | | Klinikum Grosshadern | FAX : +49-89-7095-8886 | | 81366 Munich, Germany | | +----------------------------+-------------------------------------------+