Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have already disabled root login over the ssh by modifying /etc/ssh/sshd_config.
But how would i disable root login on a server itself.
We have implemented LDAP in our environment and our security guide states that root login must be obtained by first logging into the host using his/her own regular userid then gaining root privileges by using the SU.
Code:
# lsb_release -a
LSB Version: :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: EnterpriseEnterpriseServer
Description: Enterprise Linux Enterprise Linux Server release 5.2 (Carthage)
Release: 5.2
Codename: Carthage
[root@~]# uname -a
Linux TomcatServer 2.6.18-92.el5 #1 SMP Fri May 23 22:17:30 EDT 2008 i686 i686 i386 GNU/Linux
You might want to take a look at sudo, which makes it possible for a normal user to become root (among other things) without knowing the actual root password. This, sudo, might already be partially implemented on your distro (which you do not mention).
Create and set a random/hard password for root. Put the password in an envelope and give that envelope to someone that has the authority to decide if the root password is actually needed. S/he puts the password in a safe place.
Reason for edit: Original question has been altered after given answers.
Hope this helps.
Last edited by druuna; 11-26-2010 at 03:24 AM.
Reason: Original question has been altered.
-- this will not allow the user 'root' to login directly from the login prompt in the virtual terminals (alt + Fx) even when in front of the machine.
-- but anyone other than root CAN login and if he/she knows the password to the root account; he can run 'su' command to switch to the root user.
based on the original question; I believe this is the solution.
Last edited by chickenjoy; 11-26-2010 at 03:01 AM.
@pinga123: Do not change the question in your original post _after_ people have given you advise. The answers given might look out of context if you do this!! My answer isn't appropriate any more now you have changed it.
If you want/need to change the original question for whatever reason, post a follow up message!!
@pinga123: Do not change the question in your original post _after_ people have given you advise. The answers given might look out of context if you do this!! My answer isn't appropriate any more now you have changed it.
If you want/need to change the original question for whatever reason, post a follow up message!!
I didnt change the question just added the operating system details by editing it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.