LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 07-16-2007, 01:59 AM   #1
sqldbg
LQ Newbie
 
Registered: Jul 2007
Posts: 2

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


Hi,

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.

Thanks,
 
Old 07-16-2007, 03:01 AM   #2
mjuhannus
Member
 
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

to

AllowRoot 1

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

Original Poster
Rep: Reputation: 0
Thanks.

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
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian 4.0 Etch
Posts: 1,349

Rep: Reputation: 49
There should be one regular user in a fresh install.
 
Old 07-16-2007, 08:33 PM   #5
Gortex
Member
 
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
mjuhannus
Member
 
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
b0uncer
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
Code:
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.
[code]su
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
Code:
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.
 
  


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
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


All times are GMT -5. The time now is 11:20 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration