LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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, 02: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, 03: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: 343Reputation: 343Reputation: 343Reputation: 343
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, 03:51 AM   #3
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 2,166

Rep: Reputation: 751Reputation: 751Reputation: 751Reputation: 751Reputation: 751Reputation: 751Reputation: 751
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, 04: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, 09: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, 12:23 PM   #6
DavidMcCann
Senior Member
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 4,158

Rep: Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223
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, 01:27 PM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 16,817

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 05:51 AM
unable to login directly by root aloneattack Linux - Security 10 11-20-2008 06:19 AM
How to login telnet directly root....? saif92112000 Linux - Server 8 05-05-2008 09:16 PM


All times are GMT -5. The time now is 10:28 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration