From: rob@aucsv.aukuni.ac.nz (Rob Burrowes )
Subject: Re: Single user booting of DECStations and security
Date: 20 Apr 90 22:23:43 GMT [thread overview]
Message-ID: <11@aucs7.aukuni.ac.nz> (raw)
In-Reply-To: 1399@bimacs.BITNET
Dec should have a prompt for a passwd in init before it goes single user.
I have solved this problem by patching init to use /etc/sh rather than /bin/sh
/etc/sh.c
----------------------------
#include <sys/types.h>
#include <signal.h>
#include <stdio.h>
#include <pwd.h>
main(argc,argv,envp)
char ** argv, **envp;
{
if( isatty(0)
&& isatty(1)
&& *argv[0] == '-' )
{
struct passwd *pwd, *getpwnam();
register char *namep;
char *pp;
char *getpass(), *crypt() ;
signal(SIGTERM, SIG_IGN);
signal(SIGHUP, SIG_IGN);
signal(SIGALRM, SIG_IGN);
signal(SIGTSTP, SIG_IGN);
signal(SIGSTOP, SIG_IGN);
signal(SIGTTIN, SIG_IGN);
signal(SIGTTOU, SIG_IGN);
if ((pwd = getpwnam("root")) != NULL)
{
do
{
pp = getpass("Password:");
namep = crypt(pp, pwd->pw_passwd);
} while(strcmp(namep, pwd->pw_passwd));
}
signal(SIGTERM, SIG_DFL);
signal(SIGHUP, SIG_DFL);
signal(SIGALRM, SIG_DFL);
signal(SIGTSTP, SIG_IGN);
}
execve("/bin/sh", argv, envp);
exit(0);
}
next prev parent reply other threads:[~1990-04-20 22:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
1990-04-05 12:37 Single user booting of DECStations and security Alan Judge
1990-04-05 17:06 ` Roland Schemers III
1990-04-17 12:27 ` Yedidya Israel
1990-04-17 16:50 ` Ian! D. Allen [CGL]
1990-04-18 12:48 ` Robert Macomber
1990-04-19 12:08 ` Yedidya Israel
1990-04-20 22:23 ` Rob Burrowes [this message]
1990-04-28 5:03 ` Jason Heirtzler
1990-04-17 19:59 ` Richard Wood
1990-04-17 22:35 ` Eduardo Santiago
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox