The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Login to /webmail works, clients login fails

Discussion in 'E-mail Discussions' started by itzhero, Feb 24, 2011.

  1. itzhero

    itzhero Active Member

    Joined:
    Nov 16, 2008
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    Email login works perfectly when the user goes to domain.com/webmail. I require them to log in via SSL, so they get the "login with ssl" link that takes them to https://hostname:2096/cpsess...

    They see the three email clients, but each and every one of them reports a login failure and users cannot check their email. Ideas as to a setting that might be disabling this?

    Logging in by manually entering credientials stil fails in roundcube/squirrelmail

    edit: this is only happening to one user account..
     
    #1 itzhero, Feb 24, 2011
    Last edited: Feb 24, 2011
  2. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    First, in the WebHost Manager, click Main >> Server Configuration >> Tweak Settings and click Save without making any changes, to make sure that valid configuration values are written to the php.ini files used by the Webmail clients. Try logging in to see if this has any effect on the problem.

    Next, make sure that the user is listed in only one file in /var/cpanel/users:

    Code:
    # grep $USER /var/cpanel/users/*
    The user should be mentioned in only one file. Next, make sure that there is a passwd and shadow file for the domain:

    Code:
    # ls -alh /$HOME/$USER/etc/$DOMAIN/
    View the contents of the domain's passwd and shadow file and make sure that the user is listed in both.

    In my examples above, the variables are defined as follows:

    • $HOME = the home directory, usually /home but not always
    • $USER = the cPanel username
    • $DOMAIN = the domain name in question

    There can be different reasons for the behavior you described, and we can usually correct this type of issue relatively quickly if you submit a ticket.
     
  3. itzhero

    itzhero Active Member

    Joined:
    Nov 16, 2008
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    I've done all the above and checked for what should be there. It all matches what you said should be there. Submitting a support ticket! Thank you
     
  4. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Can you also try running (for anyone in the future who has this issue) the following command:

    Code:
    /scripts/whoowns domain.com
    Above please replace domain.com with the domain name for the account that isn't working. I've seen people manually add a domain to /var/cpanel/users/username file before and it still isn't properly owned, which causes it to fail on the whoowns check for the domain. That's why I always run "/scripts/whoowns domain.com" first before any other commands for a non-working email domain.

    Next, if you can post the support ticket ID# here, that would be helpful for us to check what the resolution happened to be.
     
  5. latsyrc

    latsyrc Registered

    Joined:
    Nov 18, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    I realize this is an older thread, but it was the first one to pop up on most of the searching I did on this issue.

    For posterity
    Here is what I did to fix it:
    From the command line search the file /etc/userdomains for yourdomain.tld

    If it returns multiple entries along the lines of:
    yourdomain.tld: system
    mail.yourdomain.tld: youruser
    yourdomain.tld: youruser

    just edit the file with your favorite editor and either comment or remove the the line "yourdomain.tld: system"

    No other magic required!
     
  6. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    You cannot directly edit /etc/userdomains file without it possibly reverting whenever /scripts/updateuserdomains runs or during certain other processes. As such, this would only be a temporary bandage to an issue with your domain being owned by the wrong user.

    If your domain is showing that wrong ownership, first try moving all these files and running /scripts/updateuserdomains afterward:

    Code:
    mv /etc/userdomains /etc/userdomains.bak
    mv /etc/domainusers /etc/domainusers.bak
    mv /etc/trueuserdomains /etc/trueuserdomains.bak
    Again afterward, then you would run:

    Code:
    /scripts/updateuserdomains
    If the domain is still improperly owned, please go to /var/cpanel/users location and check for the domain name there:

    Code:
    grep domain.com /var/cpanel/users/*
    If it is showing the wrong ownership, remove the domain from the improperly owned file.

    Alternatively, if it is showing the wrong ownership due to having previously been the hostname, please go to WHM > Change Hostname and re-change the hostname by following all the steps to do so. Also, go to /var/cpanel/userdata/nobody location and ensure that the domain isn't listed there only the hostname is listed for any files.
     
    Joshinkii likes this.
  7. brentc

    brentc Member

    Joined:
    Jul 20, 2010
    Messages:
    19
    Likes Received:
    0
    Trophy Points:
    1
    I ran /scripts/whoowns $DOMAIN and it returns just a blank line. So, I'm assuming that's not correct. What's the process to now make the domain be owned correctly?
     
  8. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page