Password choices
Carl S. Gutekunst
csg at pyramid.pyramid.com
Sat Jul 9 10:26:11 AEST 1988
In article <3375 at phri.UUCP> roy at 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<f?4
HkQE:LpE
Suitable for grabbing and stuffing on a Sun or a 630. :-)
<csg>
_______________________________________________________________________________
/*
* 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);
}
More information about the Comp.unix.questions
mailing list