Problems with guest login script

Dave Hammond daveh at marob.masa.com
Sat Oct 13 12:18:32 AEST 1990


In article <83 at abode.UUCP> jtb at 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 at marob.masa.com
uunet!masa.com!marob!daveh



More information about the Comp.unix.xenix.sco mailing list