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.

Root login Blocked

Discussion in 'General Discussion' started by LovelyNetworks, Sep 27, 2006.

  1. LovelyNetworks

    Joined:
    Sep 22, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I followed the tutorial from: http://forums.cpanel.net/showthread.php?t=30159

    And i also changed permitrootlogin to no

    I thought it was somthing else. Well, now i can't login through root. I can't telnet aswell. Is there any other way to enable root login again?
    Please Help
     
  2. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    Did you create a user that can su to root?

    If not, your only option would probably to contact your data centre and ask them to change back the relevant settings.
     
  3. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    You should be able to still log into WHM from there you can add a user to the wheel group and then you should be able to login with that user and SU to root.
     
  4. chris74108

    chris74108 Well-Known Member

    Joined:
    Apr 30, 2004
    Messages:
    86
    Likes Received:
    0
    Trophy Points:
    6
    Unless you changed something you can probably just login as a regular user and type
    su - enter
    then when prompted rootpass

    The wheel restriction only works if you change
    /etc/pam.d/su

    by uncommenting (remove the #)
    #auth required /lib/security/$ISA/pam_wheel.so use_uid
    to
    auth required /lib/security/$ISA/pam_wheel.so use_uid

    If by some chance you did make this change then dgbaker is right on.
     
  5. LovelyNetworks

    Joined:
    Sep 22, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Thanks guys.
    I added regular user to wheel group. Then i logged in to ssh with that user and su to root.
    Should i always login to root through su or change sshd_config to allow permitrootlogin.
    Which is more Safer?
     
  6. chris74108

    chris74108 Well-Known Member

    Joined:
    Apr 30, 2004
    Messages:
    86
    Likes Received:
    0
    Trophy Points:
    6
    su -
    to root and disable root logins
     
  7. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    Also change your ssh port to something other than 22
     
  8. LovelyNetworks

    Joined:
    Sep 22, 2006
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    I also have changed ssh port.

    Thanks everyone who helped.
     
  9. Rogers

    Rogers Registered

    Joined:
    Feb 18, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Europe
    I have a similar problem. I set up SSH to only listen on a certain IP address. Last night my host changed my IP address and now I can't log in via SSH. How can I get to the /etc/ssh/sshd_config file to update the IP? Is there some way I can temporarily enable telnet or FTP for root access? Thanks.
     
  10. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
  11. Rogers

    Rogers Registered

    Joined:
    Feb 18, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Europe
    Thank you!! So easy when you know how... :eek:

    I ran "/etc/rc.d/init.d/sshd restart" after I edited the sshd_config file which I guess then re-starts SSH with the new settings.
     
  12. jayh38

    jayh38 Well-Known Member

    Joined:
    Mar 3, 2006
    Messages:
    1,215
    Likes Received:
    0
    Trophy Points:
    36
    Correct, each time you start / restart a service, its current config file is loaded.

    glad you got it going
     
Loading...

Share This Page