Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!yale!cmcl2!phri!marob!daveh From: daveh@marob.masa.com (Dave Hammond) Newsgroups: comp.unix.xenix.sco Subject: Re: Problems with guest login script Message-ID: <27167978.1F9E@marob.masa.com> Date: 13 Oct 90 02:18:32 GMT References: <83@abode.UUCP> Organization: ESCC, New York City Lines: 33 In article <83@abode.UUCP> jtb@abode.wciu.edu (John P. Gibbons) writes: > [ about getting the shell to exit after executing stuff in .profile ] > > btw, to avoid confusion, I want to clarify a few things regarding the >problem. If I am to run the script once logged in using sh then it runs fine, >but will not run if executed as the guest logins shell. Giving the guest >login a shell account and executing the script from the .profile will work, >but once the script is done/aborted they get full sh access. Not good. We >COULD use rsh, but we haven't tried, and more importantly it again would give >more access than we would wish to grant to new users. We just want an online >application so to speak.. The shell can be told to exit after executing commands in .profile, in at least 2 ways: 1. Add `exit' as the last command in .profile: # .profile new_user.sh exit 2. Stick `exec' in front of your new-user script call within .profile: # .profile exec new_user.sh In the first case, the shell exits after all commands in .profile are executed. In the second case, the shell overlays itself with the new user script. -- Dave Hammond daveh@marob.masa.com uunet!masa.com!marob!daveh