LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   enable root can login directly (https://www.linuxquestions.org/questions/linux-newbie-8/enable-root-can-login-directly-4175528734/)

byran cheung 12-19-2014 01:30 AM

enable root can login directly
 
In my system , the root user is not allow to login directly , but can "su - root" by another user , I want to disable it so that root can login directlly , i tried to disable the below line in /etc/group , but still not work , would advise what can I do ? thanks

wheel:x:12:root

Doc CPU 12-19-2014 02:14 AM

Hi there,

Quote:

Originally Posted by byran cheung (Post 5287372)
In my system, the root user is not allow to login directly, but can "su - root" by another user, I want to disable it so that root can login directlly, i tried to disable the below line in /etc/group, but still not work, would advise what can I do? thanks

unfortunately, you're not telling us what "your system" is. However, many distros don't set a password for the root account, and generally disallow login for accounts with no password. So probably all you have to do is to give root a password:

Code:

sudo passwd root
Note that root may still be excluded from GUI login, as this is strongly discouraged for various reasons. The above only allows root to log in to a console.

[X] Doc CPU

TenTenths 12-19-2014 02:51 AM

If you're logging in via SSH then you'll also need to check your sshd_config and ensure:

Code:

PermitRootLogin Yes

byran cheung 12-19-2014 03:36 AM

Thanks ,

we use RH 5
I checked root user have password .

root:fjasdfU7h%gfxkL5R4E:16422:0:99999:7:::



Quote:

Originally Posted by Doc CPU (Post 5287388)
Hi there,



unfortunately, you're not telling us what "your system" is. However, many distros don't set a password for the root account, and generally disallow login for accounts with no password. So probably all you have to do is to give root a password:

Code:

sudo passwd root
Note that root may still be excluded from GUI login, as this is strongly discouraged for various reasons. The above only allows root to log in to a console.

[X] Doc CPU


veerain 12-19-2014 08:42 AM

Check your /etc/login.defs file.

DavidMcCann 12-19-2014 11:23 AM

Red Hat disables root-login for the GUI for very good reasons, and the hacks need to enable it are not safe. See this thread (ignoring the off-topic bits in the middle)
http://www.linuxquestions.org/questi...-a-4175509009/

John VV 12-19-2014 12:27 PM

Quote:

we use RH 5

BUT
this is the very very old and antique RH5
rh5.0 was released in 1997
i am suprised that the almost 20 year old ( 18 year) hardware and OS are still working
rh5 is 4 full generations out of date and is older that Win98


this predates the redhat blocking on RHEL 7.0

on the CURRENT
RHEL 5.11
RHEL 6.6
you can login as root into the Gnome2 desktop you are sitting in front of

the first thing to do is buy hardware newer than 20 years old
then install a modern Operating system

contact redhat sales for
RHEL 6.6 or RHEL 7.0
https://www.redhat.com/wapps/store/catalog.html


All times are GMT -5. The time now is 05:34 AM.