LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 09-17-2009, 10:45 AM   #1
yashgoley
Member
 
Registered: Apr 2009
Posts: 40

Rep: Reputation: 15
Question " Root Logins not allowed" centOS 5.2


Hi All,

i have install new centOS 5.2 machine with "Gnome" ,but when login it gives error "root logins are not allowed"

i am facing this issue first time.

i have gone through many threads in many forums.
all are about not to use root login due to security thread.

but not getting the right solution to enable root login.
 
Old 09-17-2009, 11:19 AM   #2
lutusp
Member
 
Registered: Sep 2009
Distribution: Fedora
Posts: 835

Rep: Reputation: 102Reputation: 102
Quote:
Originally Posted by yashgoley View Post
Hi All,

i have install new centOS 5.2 machine with "Gnome" ,but when login it gives error "root logins are not allowed"

i am facing this issue first time.

i have gone through many threads in many forums.
all are about not to use root login due to security thread.

but not getting the right solution to enable root login.
If this message appears while you are trying to log in from a normal desktop graphic display, it means you cannot log into a GUI desktop as root. The solution? Don't try to log into a GUI desktop as root.

If this message appears while you are trying to access the system via SSH or Telnet from a different system, it means you cannot log on as root from anything but a local terminal. This is a security precaution.

So please tell us the circumstances. Don't be vague.

1. Where are you when you see this message? On the system or on a different system?

2. Does this message appear during graphic login, or from a shell?

3. Why do you want to get around this obvious security feature?
 
Old 09-17-2009, 11:21 AM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by yashgoley View Post
Hi All,

i have install new centOS 5.2 machine with "Gnome" ,but when login it gives error "root logins are not allowed"

i am facing this issue first time.

i have gone through many threads in many forums.
all are about not to use root login due to security thread.

but not getting the right solution to enable root login.
How are you trying to log in? Via SSH, Telnet, FTP, or at the console?
 
Old 09-17-2009, 11:21 AM   #4
~sHyLoCk~
Senior Member
 
Registered: Jul 2008
Location: /dev/null
Posts: 1,173
Blog Entries: 12

Rep: Reputation: 129Reputation: 129
You can enable by using
Code:
sudo passwd root
 
Old 09-17-2009, 11:36 AM   #5
nuwen52
Member
 
Registered: Feb 2009
Distribution: Debian, CentOS 5, Gentoo, FreeBSD, Fedora, Mint, Slackware64
Posts: 208

Rep: Reputation: 46
If you are logging in from the graphical login and getting this error, you need to go to:
system -> Administration -> Login Screen
And under the security tab, make sure "Allow local system administrator login" is enabled.

If from text, what shylock said should work. If these aren't the answer, please let us know what way you are using to log in.

But, it is probably better to log in as yourself and then run whatever you need to do as root through an "su" or an "sudo".

Last edited by nuwen52; 09-17-2009 at 11:40 AM.
 
Old 09-17-2009, 12:23 PM   #6
yashgoley
Member
 
Registered: Apr 2009
Posts: 40

Original Poster
Rep: Reputation: 15
Question

thanks for u all,

i simply trying to login from graphical login screen just after system boot( or u can say runlevel 5).it's a fresh installation.
>not from shell,ftp,ssh or any other mode.

and i have installed many times same way, but didn't get any issue.

so wt can be the issue.

to newen52>

there is no Login Screen tab in System>Administration
i am using centOS 5.
 
Old 09-17-2009, 12:29 PM   #7
j_jerry
Member
 
Registered: Sep 2009
Distribution: fedora 11
Posts: 318

Rep: Reputation: 46
Edit the /etc/gdm/gdm.conf file

In the [security] section of the file, add the following line:

AllowRoot=True

If there's no such file or line in that file do this :

edit /etc/pam.d/gdm and change the line:

auth required pam_succeed_if.so user != root quiet

to

auth required pam_succeed_if.so user quiet

Last edited by j_jerry; 09-17-2009 at 12:36 PM.
 
Old 09-17-2009, 12:39 PM   #8
yashgoley
Member
 
Registered: Apr 2009
Posts: 40

Original Poster
Rep: Reputation: 15
Question

there is no file like

/etc/gdm/gdm.conf

please follow snapshots
Attached Thumbnails
Click image for larger version

Name:	login error.jpg
Views:	44
Size:	123.0 KB
ID:	1529   Click image for larger version

Name:	root login error.jpg
Views:	31
Size:	74.5 KB
ID:	1530  

Last edited by yashgoley; 09-17-2009 at 12:45 PM.
 
Old 09-17-2009, 12:40 PM   #9
j_jerry
Member
 
Registered: Sep 2009
Distribution: fedora 11
Posts: 318

Rep: Reputation: 46
Quote:
Originally Posted by yashgoley View Post
there is no file like

/etc/gdm/gdm.conf
See my previous post, I've edited it
 
Old 09-17-2009, 12:53 PM   #10
yashgoley
Member
 
Registered: Apr 2009
Posts: 40

Original Poster
Rep: Reputation: 15
Question

no file like

/etc/pam.d/gdm

see snapshots
Attached Thumbnails
Click image for larger version

Name:	new.jpg
Views:	25
Size:	119.0 KB
ID:	1532  
 
Old 09-17-2009, 01:05 PM   #11
j_jerry
Member
 
Registered: Sep 2009
Distribution: fedora 11
Posts: 318

Rep: Reputation: 46
from terminal command: sudo gdmsetup
 
Old 09-17-2009, 01:17 PM   #12
yashgoley
Member
 
Registered: Apr 2009
Posts: 40

Original Poster
Rep: Reputation: 15
nopes
 
Old 09-17-2009, 01:25 PM   #13
j_jerry
Member
 
Registered: Sep 2009
Distribution: fedora 11
Posts: 318

Rep: Reputation: 46
what? nothing's coming up when gdmsetup is entered. huh ?

use command ls -al /etc/pam.d and post the complete screenshot of terminal.

which version of gnome is that ?
 
Old 09-17-2009, 01:48 PM   #14
nuwen52
Member
 
Registered: Feb 2009
Distribution: Debian, CentOS 5, Gentoo, FreeBSD, Fedora, Mint, Slackware64
Posts: 208

Rep: Reputation: 46
Ok, I'm using CentOS 5.3. I didn't think it would be that different. So, I ran the program and checked which process the menu option started. Try running gdmsetup.
 
Old 09-17-2009, 07:09 PM   #15
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
As lutsp said, root login from GUI is disabled for a (security) reason. It's not recommended to enable it.
You can do anything you need at the GUI by selecting the relevant menu option; if you need root, it'll ask for the root passwd.
You can also do it from the cli by doing

su -

and supply the root passwd at the prompt.
 
  


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 -"You are not allowed to access the system configuration" lynnevan Slackware 20 02-17-2008 09:12 AM
Standard commands give "-bash: open: command not found" even in "su -" and "su root" mibo12 Linux - General 4 11-11-2007 10:18 PM
Only root logins allowed?? rakamaka Linux - Software 4 10-12-2006 10:51 AM
(echo -n "standby" > /sys/power/state) only allowed for root? brynjarh Debian 5 02-14-2005 09:08 AM
Root Logins are not allowed martincho Debian 10 01-30-2005 06:55 PM

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

All times are GMT -5. The time now is 08:27 AM.

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