Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #11  
Old 17th March 2006, 22:08
dulaus dulaus is offline
Junior Member
 
Join Date: Mar 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Tutorial: Virtual hosting with Postfix

http://www.howtoforge.com/linux_postfix_virtual_hosting

I have followed these instructions but on page two of this tutorial I am not certain what to do below:

Tutorial instructions:

This is exactly what we set up in Part One. OK, so now we've got dovecot taking the user to the correct mail directory, now we still need to authenticate them. Line 23 tells us we want to support two types of authentication methods: plain and digest-md5. Plain is what every client under the sun supports, so we'll go with that. The digest portion doesn't harm anything sitting there and if your client supports it, then by all means, use it!

Finally, on lines 24 and 25 we see a userdb file and passdb file. Think of these as a second /etc/passwd and /etc/shadow file. The format of these files goes like this:

userdb
joe@domain1.com::1000:1000::/var/spo...il/domain1.com/:/bin/false::

passdb
joe@domain1.com:$1$G/FqlOG5$Vj0xmc9fKY.UVr8OWr/7C1

That encrypted password is an MD5 hash of the word 'test'. mkpasswd is a great utility for generating MD5 passwords. The 1000:1000 corresponds to the uid and gid of the "virtual" user we created in Part One. The home directory includes everything but the word before the @ in the email address.


My confusion is what to call these files and are they just plain *.txt files. I am using Mandrake 9.2 so I will be using the Apache password utility to generate passwords.

See URL below for the tutorial page 2.

Thanks

http://www.howtoforge.com/linux_post...tual_hosting_2
Reply With Quote
Sponsored Links
  #12  
Old 18th March 2006, 11:07
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Quote:
Originally Posted by dulaus
My confusion is what to call these files and are they just plain *.txt files.
It's mentioned in the tutorial:

Code:
24 auth_userdb = passwd-file /etc/dovecot/users
25 auth_passdb = passwd-file /etc/dovecot/passwd
So the user file is called /etc/dovecot/users, and the password file /etc/dovecot/passwd. They are plain-text files.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #13  
Old 26th March 2006, 10:24
pradtf pradtf is offline
Junior Member
 
Join Date: Mar 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by dulaus
passdb
joe@domain1.com:$1$G/FqlOG5$Vj0xmc9fKY.UVr8OWr/7C1

That encrypted password is an MD5 hash of the word 'test'. mkpasswd is a great utility for generating MD5 passwords.
great howto joe!
having set-up a mailserver with mysql and amavis, i really appreciate the simplicity here.

i'm stuck though on the password thing. you say that

$1$G/FqlOG5$Vj0xmc9fKY.UVr[/email]8OWr/7C1

is an MD5 hash of the word 'test' .... and it works for my login too!

however, when i generate this myself on mysql or php or here for instance:

http://www.spywire.net/password-encryption.php

i get this for 'test'

098f6bcd4621d373cade4e832627b4f6

and this doesn't let me log in.

i tried to find mkpasswd without success on freebsd and openbsd, but i'd like to know just what the MD5 hashes are that i am generating and how they relate to the hash that does work.

in friendship,
prad
Reply With Quote
  #14  
Old 26th March 2006, 11:14
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Quote:
Originally Posted by pradtf
i'm stuck though on the password thing. you say that

$1$G/FqlOG5$Vj0xmc9fKY.UVr[/email]8OWr/7C1

is an MD5 hash of the word 'test' .... and it works for my login too!
I think it's a little bug in the tutorial: this doesn't look like an MD5 to me; it's rather a crypt.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #15  
Old 26th March 2006, 19:48
pradtf pradtf is offline
Junior Member
 
Join Date: Mar 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko
I think it's a little bug in the tutorial: this doesn't look like an MD5 to me; it's rather a crypt.
great forum and nice pics on your site too!

thanks for the revelation!

the question then is how do i generate passwords to put in the passwd file? the site i mentioned earlier for instance produces 2 other formats

eg DES - test - $1$Y/wu9geZ$1o9WII91o1ApO6nWpBlUG/

which looks closer but of course close isn't good enough

what is there to create passwords that the authentication system will accept?
i do have mcrypt, but i haven't succeeded in generating the correct password.
__________________
in friendship,
prad

Last edited by pradtf; 26th March 2006 at 19:51.
Reply With Quote
  #16  
Old 26th March 2006, 20:40
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Do you have the passwd command? It should produce the correct passwords.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #17  
Old 26th March 2006, 21:19
pradtf pradtf is offline
Junior Member
 
Join Date: Mar 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko
Do you have the passwd command? It should produce the correct passwords.
yes but how do i get at the passwords? they show up in the /etc/passwd file as just '*'? i would be curious to know if we can access this any other way so you can see more than just the asterisk.

i just solved my difficulty another way though.

the md5 command (or any of the other stuff i listed earlier) are generated in what it turns out is a PLAIN-MD5 scheme. there is in fact a whole list of these schemes on the dovecot site:
http://wiki.dovecot.org/Authentication

so i just generated test using this on my freebsd system (any of the aforementioned ones give the same thing):
md5 -s test

got this as output:
MD5 ("test") = 098f6bcd4621d373cade4e832627b4f6

and put it in according to their instructions in the passwd file like this:
prad@yourcybercourt.info:{PLAIN-MD5}098f6bcd4621d373cade4e832627b4f6

so using {SCHEME} you can use a variety of password generation schemes like SHA or DES etc

the dovecot site is pretty helpful - i should have realized this before wandering over half the internet

(but i'm glad i found this place in the process)
__________________
in friendship,
prad
Reply With Quote
  #18  
Old 27th March 2006, 14:42
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Quote:
Originally Posted by pradtf
yes but how do i get at the passwords? they show up in the /etc/passwd file as just '*'? i would be curious to know if we can access this any other way so you can see more than just the asterisk.
The passwords are stored in /etc/shadow.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #19  
Old 4th May 2006, 18:59
davestroy davestroy is offline
Junior Member
 
Join Date: May 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Great tutorial

I am running a dedicated server with SUSE 10.0 and have completed all steps on this great tutorial. Even changing the password ;-)

What I do not get answered in the tutorial are following:

1. How do I find out the smtp and pop server for the virtual domain (a domain i am hosting)? I expect them to be pop.domain.com and smtp.domain.com

2. I noticed that port 25 is not accessable (110 is) when I try to telnet, how can I correct that.

I am stuck on the point where I try to configure the mail account in my mail client (ex Outlook). The pop server test is passed but not the smtp test.

And when I send mail to this address, no mail is received. I have noticed that some folders have beed created in the users mail dir. one is .INBOX containing other folders, so something is going on.

My question is, Is there some very fundamental thing missing on my server to get the mail account up and running or how should I proceed?

Thanks for any help
David
Reply With Quote
  #20  
Old 5th May 2006, 11:31
djtremors djtremors is offline
Senior Member
 
Join Date: Apr 2006
Location: Sydney
Posts: 278
Thanks: 0
Thanked 12 Times in 10 Posts
 
Default

Is it just me or is adduser suppose to be useradd which is why it's not there?
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 06:09.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.