openwebmail problem

Hi Experts,
I installed Openwebmail on my Linux Box, but whem I try to login with user name and password I get an error message saying cannot create user directory how could i solve this problem, openwebmail forum is down at the moment

thanks in adavance
rcinformaticaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Matt_AveryCommented:
Perhaps your userid doesn't own its home directory?
If that was the case, a command-line login would probably work OK, but logging in via webmail or any kind of GUI would probably fail.
0
rcinformaticaAuthor Commented:
Hi there,

thanks for the answer, the problem is that I have reistalled openwebmail after a crash, I believe before I had the directories /home/user that belonged to users, but now I don't want to recreate all the direcories so I am just looking for a workaround to enable the auto creation of the home directories via web mail when users log in, do you have any suggestion?

thanks for your time
0
Matt_AveryCommented:
I think you will be forced to recreate the users' home directories by hand.

Quickest way is probably to harvest the usernames and directory names from /etc/passwd (assuming that you're not using NIS / LDAP / etc for authentication).

The following command should output a set of commands to recreate all your home directories:
 awk '{FS=":";print "mkdir " $6;print "chown " $1 " " $6}' < /etc/passwd

(I suggest you capture the output and check it before actually running the commands)

0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

rcinformaticaAuthor Commented:
Hi thanks for that solution, last question is there a way to recreate only mail users instead of all users, my mail user names are like:

mail1.domain
mail2.domain
mail1.domain2
mail1.domain3

and so on,
or else how I could capture the output and check it before actually running the commands with a simple script

thanks again
0
Matt_AveryCommented:
1. Shove the commands into a file called "userdirs.sh" like so:

 awk '{FS=":";print "mkdir " $6;print "chown " $1 " " $6}' < /etc/passwd  > userdirs.sh

2. Now edit "userdirs.sh" with your favourite text editor, to get rid of the non-mail users

3. Finally, run the commands like this:

 . userdirs.sh

(Note that the leading ". " is required because "userdirs.sh" doesn't have a "#!/bin/sh" as its first line)

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
rcinformaticaAuthor Commented:
thanks Matt it worked perfectly

take care
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.