tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Andrew Moar <CCAM () LURE ! LATROBE ! EDU ! AU>
To: tru64-unix-managers
Subject: Passwords encryption on Digital Unix
Date: Thu, 22 Feb 1996 04:57:35 +0000	[thread overview]
Message-ID: <96076329121423.tru64-unix-managers.marc@archive.invalid> (raw)

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@latrobe.edu.au

                 reply	other threads:[~1996-02-22  4:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox