• GoDaddy Community
  • VPS & Dedicated Servers
  • VPS & Dedicated Servers

    cancel
    Showing results for 
    Show  only  | Search instead for 
    Did you mean: 
    Go to solution

    How do I get root access on my server?

    Hi There,

     

    I have tried getting root access to our server which I believe is managed VPS. I have enabled root access through the server management area. I can login into the server via ssh as the cpanel user. But when I try to either:

     

    sudo su - 

     

    I get user is not in the sudoers file

     

    or if I just try su - 

     

    I get permission denied.

     

    I have also tried sshing as root user. I have tried ssh in as admin user, no luck there either (I can't log in even though I have changed the password in cpanel.)

     

    Is there a specific way you are supposed to be able to login and get root access to the server?

    1 ACCEPTED SOLUTION

    I would recommend running the following commands to see if you have a VPS/Server or shared hosting.

     

    After logging in run the following commands.

    cd  ~ <Press Enter>
    pwd  <Press Enter>
    ls      <Press Enter>

    If you see a public_html or public_ftp folder then you have shared hosting and no root access. 

    Also note if pwd shows /home/<username> and there is no public_ folders then you most likely have a server/VPS and should have root access. and running "sudo passwd" should allow you to change roots password. If there are several users for your account try logging into the other users and see if su or sudo command works. 

    View solution in original post

    4 REPLIES 4
    Moderator
    Moderator

    Hey @msteudel,

     

    Welcome to the community! Smiley Happy

     

    If this is in fact a VPS or Dedicated Server plan, you should be able to get root access as outlined here. If this is actually a shared cPanel hosting plan, this won't have root access. 

     

    CG - GoDaddy | Community Moderator
    24/7 support available at x.co/247support

    How do I tell if I have a vps account? I have access to WHM would I have that if I was on a shared account?

    So I've tried those things, but I get the message, "User is not in sudoers file". Is there specific user that I need to login as?

    I would recommend running the following commands to see if you have a VPS/Server or shared hosting.

     

    After logging in run the following commands.

    cd  ~ <Press Enter>
    pwd  <Press Enter>
    ls      <Press Enter>

    If you see a public_html or public_ftp folder then you have shared hosting and no root access. 

    Also note if pwd shows /home/<username> and there is no public_ folders then you most likely have a server/VPS and should have root access. and running "sudo passwd" should allow you to change roots password. If there are several users for your account try logging into the other users and see if su or sudo command works. 

    View solution in original post