my ROOT is DEAD ! What am I going to do ?!

das13!dave dave at das13.snide.com
Mon Sep 17 23:01:35 AEST 1990


In article <245 at geocub.greco-prog.fr>, lath at geocub.greco-prog.fr (Laurent Lathieyre) writes:
> 
> /bin/rootsh is a shell script which make an echo to warn
> that you are super-user and make /bin/ksh
> /bin/rootsh has the following access rights -rwx------ root users

The shell script is your problem.  If you aren't running 'sh' or 'ksh', whats
going to run your shell script?  What you need is a 'C' program!  Try this one.

Here --------- Snip Here --------- Snip Here --------- Snip Here --------- Snip
/* rootsh.c
 * This program is a front end for ksh.  It prints a warning and then execs
 * Korn shell.
 */

#include <stdio.h>

main()
{
        (void)printf("Warning: You are running a root shell.\n");
        (void)execl("/bin/ksh", "ksh", 0);
}


Here --------- Snip Here --------- Snip Here --------- Snip Here --------- Snip

To undo what you've done to /etc/passwd you probably have to boot from floppy
unix and edit /etc/passwd.

DAS
-- 
David Snyder @ Snide Inc. - Folcroft, PA

UUCP:  ..!uunet!trac2000!das13!dave     INTERNET:  dave at das13.snide.com



More information about the Comp.sys.att mailing list