Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucsd!sdcc6!sdcc13!pa1034
From: pa1034@sdcc13.ucsd.EDU (John Marco)
Newsgroups: comp.sys.next
Subject: Re: Remote NeXT Users, etc.
Message-ID: <1166@sdcc13.ucsd.EDU>
Date: 25 Sep 89 21:49:20 GMT
References: <8248@oregon.uoregon.edu> <5103@ubc-cs.UUCP> <2422@ucsfcca.ucsf.edu>
Reply-To: pa1034@sdcc13.ucsd.edu.UUCP (John Marco)
Organization: Univ. of California, San Diego
Lines: 29

In article <2422@ucsfcca.ucsf.edu> jst@cca.ucsf.edu.UUCP (Joe Stong) writes:
I haven't been reading this group for very long (2 days), and I have absolutely
NO experience with the Next Box.  However, Some people have mentioned that one
cannot become root remotely.  Login will not normally allow one to logon as
the super user from anywhere but the system console.  It is possible that
/bin/su is written in a similar way (and thus is not like normal /bin/su).
In such a case, it is possible to cheat and write a small sushi-program:

main
{
	check for proper user-id or die.
	if uid is the correct one, then {
		setuid(0);
		setgid(0);	/* Now You're superuser */
		exec the shell with the log-on switch (read .cshrc, .login)
	}
}

Make a login for yourself (sysadmin, op, or some other name)
put the compiled sushi program into /users/op/bin (op's home bin directory)
login as root on the system console, make the sushi program setuid and owned
by root.  Then when you run the program as op, it will make you superuser
with no questions asked.  If this doesn't work then I don't know what the
problem could be.  I assume that you have /bin/su /bin/passwd as setuid owned
by root.

Hope this helps.
John J. Marco
pa1034@iugrad2.ucsd.edu