Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

All e-mail accounts have the same UID in passwd file

Discussion in 'E-mail Discussion' started by gramzon, Dec 4, 2017.

  1. gramzon

    gramzon Registered

    Joined:
    Dec 4, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Croatia
    cPanel Access Level:
    Root Administrator
    I have recently migrated all e-mail accounts by manually copying the "/etc/(domain)" and "/mail/(domain)" folders to a new server.

    1. Upon inspection of the "passwd" file in "/etc/(domain)" I have noticed that all of the transferred accounts have the same UID:GUID (636:634) and that all of the accounts I created after the migration to the new server ("cPanel->Email Accounts->Create Account") also have the same UID:GUID(1004:1006). Is this intended behavior or should all accounts have a different UID? If this is intended, should I change the UID:GUID of the transferred accounts to 1004:1006 as well?

    2. The transferred accounts all have this path to the shell "/usr/local/cpanel/bin/noshell" while the accounts I created on the new server have this path "home/(user)". Where can I set the default option to "/usr/local/cpanel/bin/noshell" for newly created accounts?

    This is an example of a transferred account:
    username:x:636:634::/home/(user)/mail/domain/username:/usr/local/cpanel/bin/noshell

    This is an example of a newly created account:
    username:x:1004:1006::/home/(user)/mail/domain/username:/home/(user)

    I should note that everything appears to be working after the e-mail migration. I am sorry if this is in the wrong subforum.
     
  2. gramzon

    gramzon Registered

    Joined:
    Dec 4, 2017
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Croatia
    cPanel Access Level:
    Root Administrator
    I figured out #1
    The e-mail accounts are all created with the UID:GID of the main user located in root "etc/passwd"
    I changed the UID:GID of the old e-mail accounts that were transferred to reflect the respective user on the new server.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm glad to see you were able to solve your email account UID issue. As for your other question:

    You can disable shell access in a package (WHM >> Add a Package) and ensure to use packages when creating new accounts. Or, when creating an account without a package via WHM, choose "Select Options Manually", and ensure "Shell Access" is disabled.

    For existing accounts, you can use "WHM >> Manage Shell Access" to set an account to "Jailed Shell", and then back to "Disabled Shell" if you need to reset the /etc/passwd entries that you manually copied.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice