Nathan, This won't work, the md5 system command is to generated md5 message digests. These are very different from salted passwords, which are a one-way encryption that will almost never be the same. Message digests are always the same, using them to encrypt passwords would be abit silly :)
Digests are used (normally) to check the integrity of a downloaded file. To do this from the command line (without compiling a C program to use it from libcrypt) you can use perl, as Matthew Seamon points out: % perl -e 'print crypt(q{password}, q{$1$xxxxxxxx$}), "\n";' $1$xxxxxxxx$UYCIxa628.9qXjpQCjM4a. In this case, the xxxx's would be the 8 character MD5 salt. Will On Saturday 25 January 2003 21:35, Nathan Kinkade wrote: > On Sat, Jan 25, 2003 at 01:55:50PM -0500, Bill Moran wrote: > <snip> > > > >2. What command can i use if I want to crypt a word and I see it > > >encrypoted just like the /etc/master.passwd file? For example, I want to > > >know how the password "foobar" would be encrypted in /etc/master.passwd > > >if It would be my real passwd. > > > > I don't know the answer to this one, check the source. > > <snip> > > If you are using md5 password hashing for master.passwd then you can use > the command: > # md5 -s "mypassword" > This should show you what the string ``mypassword'' will hash to using > md5. However, the other options are des and blf (blowfish). To see > which you are using check the paramter passwd_format in /etc/login.conf. > I don't know what you would use to figure the others, at least not > through bash. > > Nathan -- Willie Viljoen Freelance IT Consultant 214 Paul Kruger Avenue, Universitas Bloemfontein 9321 South Africa +27 51 522 15 60 +27 51 522 44 36 (after hours) +27 82 404 03 27 (mobile) [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message