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.

Can't change password via cpanel

Discussion in 'General Discussion' started by kirkmiesle, Aug 13, 2007.

  1. kirkmiesle

    kirkmiesle Member

    Joined:
    Jan 18, 2004
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    OHIO
    Here's a weird problem.. suddenly, people unable to change their password via cpanel. When they login to cpanel and attempt to change their password they get an error message that says:

    "There was an error manipulating the password file. This generally means you entered your old password incorrectly."

    If we login to their cpanel as root via WHM we don't get the error, but if we login with their username/password we are indeed able to duplicate the problem..

    Does anybody have any ideas on how to fix this? Could it be a permissions problem?

    Thanks
    Kirk
     
  2. ToddShipway

    ToddShipway Well-Known Member

    Joined:
    Nov 13, 2006
    Messages:
    300
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    Try changing the password using the command line with the 'passwd' command. Check this as both root and a user and see what errors if any you receive as root and as the user.

    As root:

    Code:
    passwd USERNAME
    As a user
    Code:
    su USERNAME
    passwd
    
     
  3. kirkmiesle

    kirkmiesle Member

    Joined:
    Jan 18, 2004
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    OHIO
    It works if I do it via the command line as root.

    When I SU to the user and try it, it says "passwd: Only root can specify a user name."

    Kirk
     
  4. ToddShipway

    ToddShipway Well-Known Member

    Joined:
    Nov 13, 2006
    Messages:
    300
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    Login as root and try using the command below:

    Code:
    sudo -u USERNAME passwd
    However if it works as root, the passwd binary is probably missing the suid bit.

    Check permissions on /usr/bin/passwd they should be set at below.

    Code:
    -r-s--x--x  1 root root 21200 Jun 17  2005 /usr/bin/passwd*
    
     
  5. kirkmiesle

    kirkmiesle Member

    Joined:
    Jan 18, 2004
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    OHIO
    Ah yes, how would I go about setting this correctly - I assume umask? I'm not sure what the "s" stands for..
     
  6. ToddShipway

    ToddShipway Well-Known Member

    Joined:
    Nov 13, 2006
    Messages:
    300
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    You can set this using the command below

    Code:
    chmod +s /usr/bin/passwd
     
  7. kirkmiesle

    kirkmiesle Member

    Joined:
    Jan 18, 2004
    Messages:
    18
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    OHIO
    Awesome - that fixed it! Thank you!

    Kirk
     
  8. carteluo

    carteluo Member

    Joined:
    Jun 25, 2005
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Porlamar
    cPanel Access Level:
    Root Administrator
    Twitter:
    I got the exact same issue, and that command did the trick!

    Thank you.
     
  9. grindlay

    grindlay Active Member

    Joined:
    Dec 8, 2004
    Messages:
    39
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Edinburgh, Scotland
    cPanel Access Level:
    Root Administrator
    This worked for me too, but my permissions on /etc/bin/passwd are now:
    r-s--s--x

    Is that still OK?
    G.
     
    #9 grindlay, Sep 17, 2007
    Last edited: Sep 17, 2007
  10. preeti

    preeti Registered

    Joined:
    Nov 17, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    This worked for me too :D
     
Loading...

Share This Page