Dear OSF Managers,
We have just recently upgraded one of our machines running Ultrix to an
Alpha running Digital Unix 3.2d. This all went (fairly) smoothly.
The problem we are having is that we had a program on our Ultrix machine that
created user accounts for single students and classes in the University. This
allowed us to automate the process of creating user accounts somewhat by
updating the /etc/passwd and /etc/group files and creating initial login scripts
in their accounts rather than using the adduser command.
We were using a C program to encrypt the passwords, using the crypt16 algorithm.
Unfortunately it appears that the encryption algorithm is different in Digital
Unix as user get an invalid password message when they attempt to log in.
I guess my question is what encryption algorithm should I be using? We are
running base (not enhanced) security.
This is the old code:
#include <stdio.h>
char *crypt16();
char *pw;
char pwbuf[10];
main (argc, argv)
int argc;
char *argv[];
{
int i;
char saltc[2];
long salt;
int c;
salt += getpid();
saltc[0] = salt & 077;
saltc[1] = (salt >> 6) & 077;
for (i=0; i<2; i++) {
c = saltc[i] + '.';
if (c>'9') c += 7;
if (c>'Z') c += 6;
saltc[i] = c;
}
strcpy(pwbuf, argv[1]);
pw = crypt16(pwbuf, saltc);
printf("%s\n", pw);
}
Thanks,
Andrew Moar
Latrobe University
Melbourne
email: A.Moar_at_latrobe.edu.au
Received on Thu Feb 22 1996 - 05:09:42 NZDT