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.

Changing Root Username

Discussion in 'General Discussion' started by CompufixHosting, Oct 12, 2006.

  1. CompufixHosting

    CompufixHosting Active Member

    Joined:
    Nov 28, 2005
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    Hello.

    I was wondering if there is a way I can change my username from root to something else. I already have it to where I can only ssh into the server with my ip but I would also like to change the root username due to security purposes.


    Thanks
     
  2. NT

    NT Well-Known Member

    Joined:
    May 4, 2004
    Messages:
    137
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    England, UK
    Hi,

    I don't believe this is possible, but you can prevent users from logging in as the root user remotely, and setup wheel users who are able to switch to the root account.

    Hope that helps :)
     
  3. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    ON, Canada
    Root is a unix/linux user. It can't be changed, but as NT said, if you're worried about security you can disallow root login completely and only allow users to change to root after logging in.
     
  4. CompufixHosting

    CompufixHosting Active Member

    Joined:
    Nov 28, 2005
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    Well is there a way I can make a new account with FULL root access and disable root? And is this what most people do?

    Thanks.
     
  5. NT

    NT Well-Known Member

    Joined:
    May 4, 2004
    Messages:
    137
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    England, UK
    Hi,

    Not sure - some people use 'sudo' which allows root commands through a non-root user. This also keeps a log of what commands were used and by which user.

    Why exactly do you want this capability? If you explain your reasoning then we may be able to help you find a solution :)

    Nick
     
  6. CompufixHosting

    CompufixHosting Active Member

    Joined:
    Nov 28, 2005
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    Well from what I have seen, most people disable the root account and they use another account as root. Or either during install they might use a different username other than root for the root account. And i've had people trying to login to my server with the root account.
     
  7. NT

    NT Well-Known Member

    Joined:
    May 4, 2004
    Messages:
    137
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    England, UK
    Hi,

    That's easily fixed by adding another user to the wheel group, which can be done via WHM - "Manage Wheel Group Users" :)

    What you'd then do is disable root login through /etc/ssh/sshd_config, add the user through WHM, login as that user in SSH and 'su' to root in order to execute root commands.
     
  8. Murtaza_t

    Murtaza_t Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    476
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Earth
    cPanel Access Level:
    Website Owner
    cPanel will not allow you to do this.. and you will keep on getting notification saying that there is threat on your server..

    Do as NT said, disable root and create a wheel user. You can also searh this forums and you will find plenty of help was on securing your server.
     
Loading...

Share This Page