• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 451
  • Last Modified:

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
0
rcinformatica
Asked:
rcinformatica
  • 3
  • 3
1 Solution
 
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
Microsoft Certification Exam 74-409

VeeamĀ® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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
 
rcinformaticaAuthor Commented:
thanks Matt it worked perfectly

take care
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now