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.

help with disable root and create admin with wheel permission

Discussion in 'General Discussion' started by mm1250, Apr 22, 2008.

  1. mm1250

    mm1250 Well-Known Member

    Joined:
    Nov 10, 2006
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    16
    Hello,

    I have a rather simple question. I wnat to disable the root login from SSH. My other servers are configured where I have to login using admin than I su to root. But now that I have a new server I need to figure this out for myself. So the part I dont' know is how do I create a user in Linux such as "admin".

    I know the parts where I edit the ssh_config and change the PermitRootLogin to No. Than goto WHM and configure Wheel permissions. But my question still lies in how do I create this user first?
     
  2. mm1250

    mm1250 Well-Known Member

    Joined:
    Nov 10, 2006
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    16
    Anyone care to help?
     
  3. WebScHoLaR

    WebScHoLaR Well-Known Member

    Joined:
    Dec 14, 2005
    Messages:
    511
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Planet Earth
    You will need to login to SSH as a root user to create the wheel user. Following steps should be performed:

    -Login to server via SSH using root login
    -Run adduser admin (Will create a new user admin)
    -Run passwd admin (Will ask to specify the password for admin user)
    -Add admin user to wheel group wither from WHM or by editing /etc/group file using vigr. You can also specify the group with adduser command.
    -Edit /etc/ssh/sshd_config, uncomment PermitRootLogin and set it to Yes.
    -Restart the SSH service as /etc/init.d/ssh restart

    NOTE: Leave one SSH terminal connected so that in case anything goes wrong you still have a terminal connected as a root login.
     
  4. mm1250

    mm1250 Well-Known Member

    Joined:
    Nov 10, 2006
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    16
    Thank you very much. It worked perfect!
     
  5. nyjimbo

    nyjimbo Well-Known Member

    Joined:
    Jan 25, 2003
    Messages:
    1,125
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    New York
    Dont you mean set it to "NO"

    He said he wants to disable root login, not make the system more open.

    If you set it to yes you are doing the exact opposite and making your machine more vulnerable.
     
Loading...

Share This Page