openwebmail problem

Posted on 2004-11-03
Last Modified: 2013-12-16
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
Question by:rcinformatica
    LVL 2

    Expert Comment

    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.

    Author Comment

    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
    LVL 2

    Expert Comment

    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)


    Author Comment

    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:


    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
    LVL 2

    Accepted Solution

    1. Shove the commands into a file called "" like so:

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

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

    3. Finally, run the commands like this:


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


    Author Comment

    thanks Matt it worked perfectly

    take care

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Openwrt vnstat 9 76
    installed old nagios.... 13 60
    wordpress email form 23 63
    Error regarding installation of RPM package 5 30
    Currently, there is not an RPM package available under the RHEL/Fedora/CentOS distributions that gives you a quick and easy way to allow PHP to interface with Oracle. As a result, I have included a set of instructions on how to do this with minimal …
    Daily system administration tasks often require administrators to connect remote systems. But allowing these remote systems to accept passwords makes these systems vulnerable to the risk of brute-force password guessing attacks. Furthermore there ar…
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now