[net.unix-wizards] shell scripts as login shells

guy@rlgvax.UUCP (Guy Harris) (02/20/85)

> In article <1166@sunybcs.UUCP> loverso@sunybcs.UUCP (John Robert LoVerso) writes:
> ||I've found that a shell (sh or csh) script thats somebody's login shell can't be
> ||stopped or broken out of w/o logging the person out.  Therefore, the "window
> ||of vulnerability" is removed.
> 
> Sorry, that won't work on v7 systems, where you can't execute a shell
> file with exec(2), which is what login uses (execlp, actually).

Sorry, that *will* work on V7 (and 4.xBSD, and Sys3, and SysV) systems,
where "execlp" *does* execute a shell file (as long as it has the appropriate
execute permission bit set).  I just tried an account with a shell script
as its login shell on our system (with a System III "login"), and it worked
just fine.

	Guy Harris
	{seismo,ihnp4,allegra}!rlgvax!guy

danny@itm.UUCP (Danny) (03/01/85)

In article <503@rlgvax.UUCP> guy@rlgvax.UUCP (Guy Harris) writes:
>Sorry, that *will* work on V7 (and 4.xBSD, and Sys3, and SysV) systems,
>...
Sorry, Guy, on our Perkin-Elmer 3210 running "edition7" (used to be "unix")
with a few Berkleyisms (vi, more, 1K disk blocks) login *will not*
execute a shell script...I sure wish it would....
-- 
				Daniel S. Cox
				({gatech|akgua}!itm!danny)

guy@rlgvax.UUCP (Guy Harris) (03/06/85)

> In article <503@rlgvax.UUCP> guy@rlgvax.UUCP (Guy Harris) writes:
> >Sorry, that *will* work on V7 (and 4.xBSD, and Sys3, and SysV) systems,
> >...
> Sorry, Guy, on our Perkin-Elmer 3210 running "edition7" (used to be "unix")
> with a few Berkleyisms (vi, more, 1K disk blocks) login *will not*
> execute a shell script...I sure wish it would....

Then you should yell at P-E; the code in the V7/S3/S5/4.xBSD/whatever "login"
uses "execlp" to run your login shell, which will execute shell scripts
(as long as the shell script has the execute bit set).  It's successfully
worked with the S5 and 4.2BSD "login"s.  Either P-E broke "execlp", or they
broke "login", or the permissions on your shell script are wrong, or the
shell script is broken.
-- 
	Guy Harris
	{seismo,ihnp4,allegra}!rlgvax!guy