Xref: utzoo comp.unix.questions:8109 comp.misc:2770 comp.mail.uucp:1432 Path: utzoo!attcan!uunet!lll-winken!lll-lcc!pyramid!csg From: csg@pyramid.pyramid.com (Carl S. Gutekunst) Newsgroups: comp.unix.questions,comp.misc,comp.mail.uucp Subject: Re: Password choices Keywords: passwords Message-ID: <30453@pyramid.pyramid.com> Date: 9 Jul 88 00:26:11 GMT References: <3375@phri.UUCP> Followup-To: comp.misc Organization: Pyramid Technology Corp., Mountain View, CA Lines: 36 In article <3375@phri.UUCP> roy@phri.UUCP (Roy Smith) writes: >When assigning passwords for incomming uucp accounts, I just type random >patterns on the keyboard. Or you can try this trivial little jewel. Output looks something like this: a[=lRCuV X4Bb_______________________________________________________________________________ /* * randpass.c -- generate really random passwords. For BSD Unixes only. * Includes all ASCII chars '0' through 'z', except '@' and '\\' */ #define PASSCHARS 8 main() { int i, c; char s[PASSCHARS+1]; long random(); srandom((int) time(0)); for (i = 0; i < PASSCHARS; ++i) { while ((c = random() % 75 + '0') == '@' || c == '\\') ; s[i] = c; } s[PASSCHARS] = '\n'; write (1, s, PASSCHARS+1); }