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.

How to disable direct login?

Discussion in 'General Discussion' started by Gliebster, Aug 4, 2003.

  1. Gliebster

    Gliebster Active Member

    Joined:
    Jul 17, 2002
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    I've been reading around that it's a good idea to disable direct root login to the server. They say it's good for preventing wankers from cracking in with brute-force.

    I'd like to set it up so I login as admin then switch to root. Problem is, I don't even know how to setup the admin user, much less disable direct root access.

    Can anybody give me a quick guide for this?

    cPanel.net Support Ticket Number:
     
  2. shykot

    shykot Member

    Joined:
    Jun 23, 2003
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    US
    i) Create a admin user
    ii) pico /etc/passwd
    iii) locate the 'admin' entry which should be something like
    admin:x:500:500::/home/admin:/bin/bash
    and this shoudl be set to th same as the 'root' in the same file..

    Thats all....

    cPanel.net Support Ticket Number:
     
  3. mmkassem

    mmkassem Well-Known Member

    Joined:
    Oct 21, 2002
    Messages:
    390
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Egypt
    ::eek: :rolleyes: :mad:

    1. Add username admin from shell (adduser)
    2. Assign a password to the username: admin
    3. then add admin to the wheel group using WHM
    4. pico /etc/ssh/sshd_config
    uncomment :
    #PermitRootLogin yes
    and make it:
    PermitRootLogin no

    cPanel.net Support Ticket Number:
     
  4. tAzMaNiAc

    tAzMaNiAc Well-Known Member

    Joined:
    Feb 16, 2003
    Messages:
    559
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Sachse, TX
    Correct, Mahmoud.

    I keep having to enable it so I can allow cpanel tech to look at it.. without having to know my user account too! Ha :)

    Brenden

    cPanel.net Support Ticket Number:
     
  5. mmkassem

    mmkassem Well-Known Member

    Joined:
    Oct 21, 2002
    Messages:
    390
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Egypt
    Forgot to add:
    restart sshd ..
    remember to keep your ssh connection and try to connection from a new window.
    To make sure it is working first.

    cPanel.net Support Ticket Number:
     
  6. goodmove

    goodmove Well-Known Member

    Joined:
    May 12, 2003
    Messages:
    624
    Likes Received:
    0
    Trophy Points:
    16
    While in /etc/ssh/sshd_config, it might also be prudent to change the SSH port to something in the 15000 - 20000 range.
     
  7. shykot

    shykot Member

    Joined:
    Jun 23, 2003
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    US
    Thankyou for the reply as it was more useful to me than mine.. Thanskyou everyone who have replied this.

    cPanel.net Support Ticket Number:
     
  8. emeric21

    emeric21 Well-Known Member

    Joined:
    Aug 5, 2002
    Messages:
    49
    Likes Received:
    0
    Trophy Points:
    6
    forget my question :)
     
    #8 emeric21, Dec 23, 2003
    Last edited: Dec 23, 2003
  9. wipl_piyush

    wipl_piyush Well-Known Member

    Joined:
    Oct 31, 2003
    Messages:
    66
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    NY
    I am on a cpanel box..with latest version.

    Today i tried to disable the Direct Root Access to my box. Every thing went fine...i.e i was able to login with admin user and then did su - and supplied the root password......ok...

    The problem came when i tried restarting any service on the box....

    root# service cpanel restat
    unkown command /bash.......

    root@ service httpd restart
    unknown command...

    So i made the things back to the same as it was earlier..and then everything went fine...

    please help i really want to disable direct root login.
     
Loading...

Share This Page