Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 07-16-2007, 01:59 AM   #1
LQ Newbie
Registered: Jul 2007
Posts: 2

Rep: Reputation: 0
Login issue. Can't login as root


I've just installed redhat 4 on a virtual pc on my windows laptop. When linux boots up into the graphical login and I try to login as "root" I get told root logins are not allowed.

When I follow the instructions on the redhat site to set it to single user I get "kernel panic - not synching: attempted to kill init!"

Any suggestions much appreciated.

Old 07-16-2007, 03:01 AM   #2
Registered: Sep 2004
Location: Finland
Distribution: Ubuntu 10.04, Debian 5, OpenSUSE 11.3
Posts: 60

Rep: Reputation: 15
If you truly for some reason have to login as root, which usually isn't necessary, you can allow root logins.

You must change line
AllowRoot 0


AllowRoot 1

in your /etc/X11/gdm/gdm.conf -file
Old 07-16-2007, 05:03 PM   #3
LQ Newbie
Registered: Jul 2007
Posts: 2

Original Poster
Rep: Reputation: 0

But its a fresh install. There are no other users other than root.

How do I change the file when I can't login at all?
Old 07-16-2007, 05:18 PM   #4
Senior Member
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian 9 Stretch
Posts: 2,179
Blog Entries: 8

Rep: Reputation: 345Reputation: 345Reputation: 345Reputation: 345
There should be one regular user in a fresh install.
Old 07-16-2007, 08:33 PM   #5
Registered: Nov 2005
Location: Enid Ok
Distribution: ubuntu 64 , debian , fedora core , vista ultimate 64, Winows 7 64 ultimate :p
Posts: 219

Rep: Reputation: 30
what if you just pass linux 1 at the boot loader ?
Old 07-17-2007, 02:22 AM   #6
Registered: Sep 2004
Location: Finland
Distribution: Ubuntu 10.04, Debian 5, OpenSUSE 11.3
Posts: 60

Rep: Reputation: 15
I think runlevel 1 didn't work, but you can press ctrl+alt+f1 when you get to the login screen to get to an terminal. From there you should be able to login. Just the graphical logins are not allowed.
Old 07-17-2007, 02:32 AM   #7
LQ Guru
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
There should really be no need for a graphical login for root. All the tasks you need to do can be done with a regular user, with some certain things ran with root privileges (still not lot logging in as root). The preferred way to do things with root privileges without logging in as root is to use sudo. Configuration consists of modifying /etc/sudoers to allow some user(s) run some command(s) with sudo, and perhaps - if needed - by adding those users that need to run sudo to the 'sudo' group. There's a temptation to configure sudo so that some users can run anything with it, possibly even without typing a password, but that's as dangerous as telling your root password in public.

- make sure sudo is installed
which sudo
- configure /etc/sudoers for your needs; only add those users (or rather just one user) that can't live without being able to do something as root, and only give them access to the exact commands they need to run. Note that allowing them to run a shell or 'su' as root lets them access root account with full permissions to everywhere.
gedit /etc/sudoers[code]
(use any text editor instead of 'gedit' if you like)
- try if it works; if it doesn't, adding the user in hand to 'sudo' group could help, depending on the configuration
sudo /sbin/iptables -L
The above would print iptables current rules, and isn't (or shouldn't be) available for non-root users by default.


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
915resolution patch issue, root login bjchroni Linux - Laptop and Netbook 4 01-05-2007 03:44 PM
wrong login shell prevent root login cefs99 Linux - Security 4 05-31-2006 08:28 AM
Gnome: Cannot login as default user, sends back to login, works as root Danny-T Linux - Newbie 2 05-27-2006 03:44 AM
Login issue - root only TBomb Linux - Software 16 07-27-2004 08:26 AM
can only login as root? user login doesnt work..? anyone? hacking_4_b33r Linux - General 1 02-05-2004 11:40 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:57 AM.

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