Unable to login as root but swithing from normal user to root works fine


#1

Dear Friends

I come across one issue. Issue is like I am not able to login as root from CLI also GUI. If I am logging to normal user then switching to root user with (su -) then I become able to login as root. But directly I am not able to login so can you please share where is the issue or what is the workaround .

Thanks in advance.

Regards
Jagamohan


#2

May be root login is disabled over ssh. Just enable it

vim /etc/ssh/sshd_config 

PermitRootLogin yes     (enable this option)

after changes restart the service

/etc/init.d/sshd restart

if you are using latest version of redhat or centos

systemctl restart sshd