Re: Creating standalone passwords in /etc/passwd format

2005-08-16 Thread Gareth Bailey
I have had a look at crypt (enigma), but it doesn't appear to use the
same algorithm? I need the same as that used in passwd!

Thanks

On 8/15/05, Gareth Bailey [EMAIL PROTECTED] wrote:
 Hi there,
 
 I am using pserver for authentication on CVS. Rather than use the same
 passwords as in /etc/passwd, I'd rather create different ones for
 users. How would I output a password to, for example, a text file in
 the same format as that of /etc/passwd.
 
 i.e: # xxx mynewpassword  encrypted_password.txt
 
 
 Thanks!

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Creating standalone passwords in /etc/passwd format

2005-08-16 Thread Lowell Gilbert
Please don't top-post.

Gareth Bailey [EMAIL PROTECTED] writes:

 I have had a look at crypt (enigma), but it doesn't appear to use the
 same algorithm?

Correct.

 I need the same as that used in passwd!

The algorithm is selectable; the mechanism is crypt(3).

The standard utility for what you are trying to do is openssl(1).
It used to be makekey(1), but that has been obsoleted by openssl.

 Thanks
 
 On 8/15/05, Gareth Bailey [EMAIL PROTECTED] wrote:
  Hi there,
  
  I am using pserver for authentication on CVS. Rather than use the same
  passwords as in /etc/passwd, I'd rather create different ones for
  users. How would I output a password to, for example, a text file in
  the same format as that of /etc/passwd.
  
  i.e: # xxx mynewpassword  encrypted_password.txt
  
  
  Thanks!
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
 

-- 
Lowell Gilbert, embedded/networking software engineer, Boston area
http://be-well.ilk.org/~lowell/
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Creating standalone passwords in /etc/passwd format

2005-08-16 Thread Daniel Marsh
On Tue, 16 Aug 2005 18:07:06 +0800, Gareth Bailey [EMAIL PROTECTED]  
wrote:



I have had a look at crypt (enigma), but it doesn't appear to use the
same algorithm? I need the same as that used in passwd!

Thanks


Try making a PERL script with the following lines...

$UserDetails{EncryptedPassword} = crypt($UserDetails{TextPassword}, join  
'', ('.', '/', 0..9, 'A'..'Z', 'a'..'z')[rand 64, rand 64]); # this  
creates an encrypted password the same format as the MD5 in /etc/passwd


my $PassMD5 = crypt($Login-{Password}, $EncryptedPassword); # this  
creates the same MD5 string, used for verification of entering passwords  
encrypted with the above method.


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Creating standalone passwords in /etc/passwd format

2005-08-15 Thread Gareth Bailey
Hi there,

I am using pserver for authentication on CVS. Rather than use the same
passwords as in /etc/passwd, I'd rather create different ones for
users. How would I output a password to, for example, a text file in
the same format as that of /etc/passwd.

i.e: # xxx mynewpassword  encrypted_password.txt


Thanks!
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]