Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!samsung!think!snorkelwacker!bloom-beacon!eru!luth!sunic!tut!santra!santra!iisakkil From: iisakkil@niksula.hut.fi (Mika R Iisakkila) Newsgroups: comp.sys.ibm.pc Subject: Re: PASSWORD Message-ID: Date: 2 Feb 90 09:14:01 GMT References: <234.25C2B9DD@uscacm.UUCP> <-286529961@hpcupt1.HP.COM> Sender: news@santra.uucp (Cnews - USENET news system) Organization: Helsinki University of Technology, Finland Lines: 31 In-Reply-To: swh@hpcupt1.HP.COM's message of 30 Jan 90 15:58:58 GMT Here's a piece of Turbo C code: passwd.c: #include #include #include main(argc,argv) int argc; char **argv; { char *s; char *envp[1] = {NULL}; for(;;) { s = getpass("Password : "); if (!strcmp(s,"some_string")) { if (execve(argv[1],argv+1,envp)) exit(0); } } } , where 'some_string' is a password you'd like to use. Compile this to passwd.exe and put a line 'shell=c:\passwd.exe c:\command.com' in your config.sys. After booting the computer will prompt for a password; command.com won't be run unless the password is given correctly. If your roommate is clever enough, he'll boot the computer from a dos diskette, in which case passwd.exe won't be able to do anything...