Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!osu-cis!tut!tut.cis.ohio-state.edu!mumble@karl From: mumble%karl@tut.cis.ohio-state.edu.UUCP Newsgroups: comp.sys.att Subject: Re: slide - a command to make you root Message-ID: <1867@tut.cis.ohio-state.edu> Date: Wed, 18-Nov-87 11:05:53 EST Article-I.D.: tut.1867 Posted: Wed Nov 18 11:05:53 1987 Date-Received: Sat, 21-Nov-87 06:19:53 EST References: <223@althea.UUCP> Sender: news@tut.cis.ohio-state.edu Reply-To: karl@tut.cis.ohio-state.edu Lines: 29 In-reply-to: rjd@althea.UUCP's message of 17 Nov 87 15:26:38 GMT rjd@althea.UUCP writes: This is slide, a little program I find very handy on the 3b1. It allows selected users to become root without prompting for a password. You worked much too hard at that. main (argc, argv) int argc; char *argv[]; { char *shell = getenv("SHELL"); setuid (0); setgid (0); execv ((shell ? shell : "/bin/csh"), argv); } This has the effect that calling this program (we call it "enable") isz done just as one would call a shell, e.g., "enable -fc 'chown username /File/Name'" does what you expect. Make it mode 04750, chown'd to root, and hide it in a directory of mode 0700 which is owned by a user who is allowed to use it. And then kill that user if he ever walks away from his terminal while logged in. Half :-). -=- Karl