From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1164f8,9aee0c9e48d0a1a3 X-Google-Attributes: gid1164f8,public X-Google-Thread: 10b612,9aee0c9e48d0a1a3 X-Google-Attributes: gid10b612,public X-Google-ArrivalTime: 1990-04-20 15:23:43 PST Path: gmdzi!unido!mcsun!uunet!samsung!munnari.oz.au!kaukau.comp.vuw.ac.nz!comp.vuw.ac.nz!dsiramd!marcamd!aucsv!rob From: rob@aucsv.aukuni.ac.nz (Rob Burrowes ) Newsgroups: comp.sys.dec,comp.unix.ultrix Subject: Re: Single user booting of DECStations and security Keywords: ultrix 3.0 decstation 2100 3100 security Message-ID: <11@aucs7.aukuni.ac.nz> Date: 20 Apr 90 22:23:43 GMT References: <1990Apr5.123703.2251@maths.tcd.ie> <1399@bimacs.BITNET> Organization: Computer Science Dept. University of Auckland, New Zealand Xref: gmdzi comp.sys.dec:2322 comp.unix.ultrix:2715 Posted: Fri Apr 20 23:23:43 1990 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 #include #include #include 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); }