Hylafax Mailing List Archives

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: password problems??



Gerry Doris wrote:
> 
> My problem is that I don't know how to encrypt a password.
> 
> Everytime I try I'm told to get admin privileges first.  I can't get admin
> privileges without a password.  What is the procedure to create an encrypted
> password to put in the root entry???
> 
> The only entries in hosts now are the default 127.0.0.1 and localhost.
> 
> BTW, the SuSE distribution has shadow passwords.  If I look at my system
> password file all I see is an 'x'.
> 
> Gerry
> 

Tony Chen (nz) sent me the attached c program to generate "DES"
passwords...

This was the answer to most of my problems with hosts file... the only
other issue learnt by error was to put the most selective entry first...
it is mentioned in the man (5F) hosts

Keith
-- 
http://members.ocean.com.au/kapgray/#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <crypt.h>
#include <time.h>

main(int argc, char* argv[])
{
	char salt[3];
	time_t now = time(NULL);

	if (argc < 2)
	{
		fprintf(stderr, "Usage: %s plaintest\n", argv [0]);
		return(EXIT_FAILURE);
	}

	if (getpid() %52 > 26)
		salt[0] = getpid() %26 + 'a';
	else
		salt[0] = getpid() %26 + 'A';
	if (now %52 > 26)
		salt[1] = getpid() %26 + 'a';
	else
		salt[1] = getpid() %26 + 'A';
	salt[2] = '\0';

	printf("%s\n", crypt(argv[1], salt));
	return(EXIT_SUCCESS);
}



Home
Report any problems to webmaster@hylafax.org

HylaFAX is a trademark of Silicon Graphics Corporation.
Internet connectivity for hylafax.org is provided by:
VirtuALL Private Host Services