From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96076329121423.tru64-unix-managers.marc@archive.invalid> From: Andrew Moar Date: Thu, 22 Feb 1996 04:57:35 +0000 To: tru64-unix-managers Subject: Passwords encryption on Digital Unix X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96076329121423 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 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@latrobe.edu.au