LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 12-19-2014, 01:30 AM   #1
byran cheung
Member
 
Registered: Sep 2013
Posts: 321

Rep: Reputation: Disabled
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
 
Old 12-19-2014, 02:14 AM   #2
Doc CPU
Senior Member
 
Registered: Jun 2011
Location: Stuttgart, Germany
Distribution: Mint, Debian, Gentoo, Win 2k/XP
Posts: 1,099

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
Hi there,

Quote:
Originally Posted by byran cheung View Post
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
 
Old 12-19-2014, 02:51 AM   #3
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

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

Code:
PermitRootLogin Yes
 
Old 12-19-2014, 03:36 AM   #4
byran cheung
Member
 
Registered: Sep 2013
Posts: 321

Original Poster
Rep: Reputation: Disabled
Thanks ,

we use RH 5
I checked root user have password .

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



Quote:
Originally Posted by Doc CPU View Post
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
 
Old 12-19-2014, 08:42 AM   #5
veerain
Senior Member
 
Registered: Mar 2005
Location: Earth bound to Helios
Distribution: Custom
Posts: 2,524

Rep: Reputation: 319Reputation: 319Reputation: 319Reputation: 319
Check your /etc/login.defs file.
 
1 members found this post helpful.
Old 12-19-2014, 11:23 AM   #6
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Debian
Posts: 6,142

Rep: Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314Reputation: 2314
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/
 
Old 12-19-2014, 12:27 PM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
root login directly into -bash-3.2# prasadshetty Linux - Newbie 6 07-28-2010 04:51 AM
unable to login directly by root aloneattack Linux - Security 10 11-20-2008 05:19 AM
How to login telnet directly root....? saif92112000 Linux - Server 8 05-05-2008 08:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration