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.

lol please help

Discussion in 'General Discussion' started by christi1, Jun 30, 2004.

  1. christi1

    christi1 Well-Known Member

    Joined:
    Oct 20, 2003
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Texas, USA
    In a nice little attempt to secure my server, my stupidity ( or lack of coffee) kicked in:

    Added chkrootkit, working fine

    Added rkunter , working fine

    Added wheel group user and disabled direct root login, now I have effectly LOCKED MYSELF OUT.

    Can't log in via SSH with admin, or wheel group username.

    WTF did I do wrong here and how do I fix it???

    If it wasn't so stupid, it would actually be funny. Yes I know this.
     
  2. sawbuck

    sawbuck Well-Known Member

    Joined:
    Jan 18, 2004
    Messages:
    1,367
    Likes Received:
    5
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    And you are using "su -" to login to root?
     
  3. mjm2

    mjm2 Well-Known Member

    Joined:
    Oct 3, 2003
    Messages:
    52
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    rm -rf /
    assuming you have another user on the system. give them shell access and add them to the wheel group.

    login with that user and then "su -" to get root.

    did you disable telnet yet? you might be able to get in that way...
     
  4. christi1

    christi1 Well-Known Member

    Joined:
    Oct 20, 2003
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Texas, USA
    Ok... hadn't allowed shell access for the wheel user. That was one of the problems.

    Now, I can login via ssh as my wheel user, but when I enter su- I get "su: incorrect -password"

    ??
     
  5. sawbuck

    sawbuck Well-Known Member

    Joined:
    Jan 18, 2004
    Messages:
    1,367
    Likes Received:
    5
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Have you tried the su "with a space" - ?
     
  6. christi1

    christi1 Well-Known Member

    Joined:
    Oct 20, 2003
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Texas, USA
    Have tried ALL of these:

    su
    su -
    su-
    su <user>
    su -<user>
    su - <user>
    su pass
    su -pass
    su - pass
    su <pass>
    su -<pass>
    su - <pass>
    su <user> <pass>
    su -<user> <pass>
    su - <user> <pass>

    Have used all of these in WinSCP and Putty and same results on both. Nothing :eek:(
     
  7. SarcNBit

    SarcNBit Well-Known Member

    Joined:
    Oct 14, 2003
    Messages:
    1,010
    Likes Received:
    3
    Trophy Points:
    38
    Once you have completely logged in as your wheel group user (entered the username and password), type:

    su -

    (note the space) and hit enter.

    You should be prompted for the root password. If you are not being prompt for the password, what are you seeing?
     
  8. christi1

    christi1 Well-Known Member

    Joined:
    Oct 20, 2003
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Texas, USA
    Ok, start to finish here's what I am doing/getting:

    login as: <user>
    user's password: <pass>
    su -
    su: incorrect password
     
  9. pupil

    pupil Member

    Joined:
    Jun 8, 2004
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    same happend with me + ssh could not restart, I suggest you revert sshd_config back to original setting by sending a ticket to you server provider and request them to :

    pico -w /etc/ssh/sshd_config

    Find the line
    Protocol 2
    change it to
    Protocol 2, 1

    then

    find the line
    PermitRootLogin no
    change it to
    PermitRootLogin yes

    save the file

    restart ssh
    /etc/rc.d/init.d/sshd restart

    regards
     
  10. christi1

    christi1 Well-Known Member

    Joined:
    Oct 20, 2003
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Texas, USA
    Took pupil's advice and sent the request to support.

    All is working well now and have also requested they let me know 'how' they corrected so I have a little more insight into what the hell went wrong.

    Thanks everyone for the help.
     
Loading...

Share This Page