LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 02-27-2010, 09:38 PM   #1
trien27
Member
 
Registered: Feb 2005
Location: NYC
Distribution: Fedora 14
Posts: 195

Rep: Reputation: 15
problem logging in as root on FC12


I can't log in as root in FC12? I could only su from user login to get to root?! Can someone give a suggestion on how to solve this? thanks.
 
Old 02-28-2010, 02:27 AM   #2
decrepit
Member
 
Registered: May 2006
Distribution: Ubuntu10.04, < fedora12
Posts: 347

Rep: Reputation: 34
This topic's been here before, from memory it's a security issue.
If you need root's path log in with a " -" sign after the su, ie su -

You can also open file browser as root by typing "nautilus"
 
1 members found this post helpful.
Old 02-28-2010, 02:35 AM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
that is not a problem. Fedora and Gnome are designed that way
------ DO NOT LOG IN USING THE GUI AS ROOT !!!!! ----


please read the fedora docs!
http://docs.fedoraproject.org/
 
1 members found this post helpful.
Old 03-19-2010, 10:24 PM   #4
k_ewell
LQ Newbie
 
Registered: Mar 2010
Posts: 2

Rep: Reputation: 0
To permit root login to GUI
cat /etc/pam.d/gdm
#auth required pam_succeed_if.so user != root quiet
cat /etc/pam.d/gdm-passwd
#auth required pam_succeed_if.so user != root quiet
 
Old 03-19-2010, 10:30 PM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
k_ewell you do know that if you login as root using that hack .You WILL not be able to update any software using the gui

and yum will also NOT work

that is part of the security .

that is WHY we are stating that one use
" su - "
 
Old 03-20-2010, 09:21 AM   #6
k_ewell
LQ Newbie
 
Registered: Mar 2010
Posts: 2

Rep: Reputation: 0
Smile

Quote:
Originally Posted by John VV View Post
k_ewell you do know that if you login as root using that hack .You WILL not be able to update any software using the gui

and yum will also NOT work

that is part of the security .

that is WHY we are stating that one use
" su - "
maybe auto update will not work, and there are also some warning msg will login as root
but yum will also work well , I have tried this .
 
Old 03-25-2010, 05:34 PM   #7
winkydo
Member
 
Registered: Jan 2005
Location: fort worth, tx
Distribution: fedora core
Posts: 30

Rep: Reputation: 15
i agree with keep with the out of box security. use 'sudo su -' and you'll be at cmd from root, then you can use yum or launch 'nautilus' for a gui file browsing experience.
 
Old 04-09-2010, 08:24 AM   #8
alli_yas
Member
 
Registered: Apr 2010
Location: Johannesburg
Distribution: Fedora 14, RHEL 5.5, CentOS 5.5, Ubuntu 10.04
Posts: 559

Rep: Reputation: 92
Got to agree with John VV here, you really DON'T want to be logged in as root all the time.

You can do all sorts of stuff that would damage or completely break your install.

An alternative solution should you wish to be logged in as root for a limited amount of time:

Firstly, when logged in as root do the following:

Code:
# vim /etc/sudoers
Add the following line - this basically will make your ordinary user a passwordless sudeor

Code:
 yasfir  ALL=(ALL)       NOPASSWD: ALL
At this stage, if you ran a command like # sudo su - you would be logged in as root without entering a password.

To take it one step further, if you're lazy to type in sudo su - (as I am) you can do the following. Do all of the following as your local user that you'd login to your box with (in my case yasfir).

In a directory of your choice (I used my home dir - /home/yasfir) create a new script with a short/simple name that is easy to type:

Code:
 # vim yas
Add in the following into the script:

Code:
#!/bin/bash
sudo su -
Thereafter change permissions of this script to make it executable (chmod 755 should do the trick). Then ensure that wherever
this script lives, you add that location to your PATH environment variable; so in my case for example:

Code:
# more .bash_profile 

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin:/home/yasfir

export PATH
After doing the above; when logged as a local user (in my case yasfir), just typing in the name of your script (in my case yas) will simply log you in as root.

Hope the above helps, Cheers
yasfir
 
Old 05-08-2010, 07:40 PM   #9
AndicNZ
LQ Newbie
 
Registered: May 2010
Location: Upper Hutt, New Zealand
Distribution: FC 12
Posts: 2

Rep: Reputation: 0
Thumbs down A Rant about Security

Quote:
Originally Posted by John VV View Post
that is not a problem. Fedora and Gnome are designed that way
------ DO NOT LOG IN USING THE GUI AS ROOT !!!!! ----


please read the fedora docs!
http://docs.fedoraproject.org/
Why on Earth does the paranoia of the WinTel environ have to permeate everywhere.

Turning off all that rubbish in Vista was bad enough, but Windows 7 is making it very hard for me to use my own PC. FC is doing likewise. THE CHOICE IS MINE surely?

I started in IT in '64, ventured into Unix in '77, and until 2 years ago was supporting a financial system running Unix V that handled $1Bn per business day - the only reason we were forced to retire it was that the hardware could no longer be supported - not Unix V.

And Guess What? We logged in as root !! $1Bn per day and we logged in as root !

Since its migration to SPARC, the system has become unstable by comparison - cest la guerre - that's progress I suppose.

So again, if I have my PCs and Servers at home, I find it infuriating and frankly obnoxious that I have to find ways to circumvent the things such as SEL and GDM etc.

Rant over from a member new to this forum
 
0 members found this post helpful.
Old 05-09-2010, 04:11 AM   #10
DrLove73
Senior Member
 
Registered: Sep 2009
Location: Srbobran, Serbia
Distribution: CentOS 5.5 i386 & x86_64
Posts: 1,118
Blog Entries: 1

Rep: Reputation: 129Reputation: 129
It's like putting on a seat-belt whey you enter the car. It SHOULD be done, for safety reasons. Once you have a habit to do so, you are MUCH lesser prone to slip with your security.

I still use my Linux Desktop with root password, but I use my Laptop with regular user password, frustrating or not. I discipline my self to reduce possible security (or stability!!!!) issues. Even if I would not have needed strong security (and I do), I might use same bad practice on someone else's system and create them possible security issue I would have been responsible for.

The desktop with root password access is installed when CentOS 5.0 came out and I haven't known any better, and since I heavily installed, updated, compiled, etc.. various packages for CentOS/RHEL I was almost always inside Krusader with root access (and still am), but in a week or two that desktop will be reinstalled and proper user will be established and I will force my self to use it. Especially since I am not the only one to use it. There were quite a few incidents in my IT support career where kids on Windows tried to delete windows folder to free some space for their games!!!

BTW, strong and emphasized warnings on this topic ARE welcomed and warranted, to model newbies to think safety first.

Last edited by DrLove73; 05-09-2010 at 04:14 AM.
 
Old 05-10-2010, 02:27 AM   #11
alli_yas
Member
 
Registered: Apr 2010
Location: Johannesburg
Distribution: Fedora 14, RHEL 5.5, CentOS 5.5, Ubuntu 10.04
Posts: 559

Rep: Reputation: 92
Quote:
Why on Earth does the paranoia of the WinTel environ have to permeate everywhere.

Turning off all that rubbish in Vista was bad enough, but Windows 7 is making it very hard for me to use my own PC. FC is doing likewise. THE CHOICE IS MINE surely?

I started in IT in '64, ventured into Unix in '77, and until 2 years ago was supporting a financial system running Unix V that handled $1Bn per business day - the only reason we were forced to retire it was that the hardware could no longer be supported - not Unix V.

And Guess What? We logged in as root !! $1Bn per day and we logged in as root !

Since its migration to SPARC, the system has become unstable by comparison - cest la guerre - that's progress I suppose.

So again, if I have my PCs and Servers at home, I find it infuriating and frankly obnoxious that I have to find ways to circumvent the things such as SEL and GDM etc.

Rant over from a member new to this forum
Well not everyone started in IT in '64, and started with Unix in '77. The point is that just as the various flavours of Linux are diverse, so are the users; there are all sorts of users from Noobs all the way to Guru's (much like the users in the forum).

Just take a read of some of the questions posted in the "Linux Newbies" Forum and you'll be able to see this.

The Fedora project are concious of this and thus for safety reasons its always better NOT to login as root.
 
Old 05-10-2010, 01:46 PM   #12
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
for someone with a lot of *nix exp it is not a problem to remove the safety ( think of it as a "safety" on a loaded gun)

in the hands of a rookie... use your imagination
in the hands of a pro.. a bit different


i root log in every now and then -- it makes some things easer . but it is not something i do all the time
also a terminal login as root is different than running xorg as root
xorg is where the problem lies

for new inexperienced users to turn off SELinux ( or app-guard )- "it's to hard to use" and boot into Gnome as root " because i can not be bothered to type in a password"
this is what we want stopped ,we WANT people to LEARN something
 
Old 05-10-2010, 04:47 PM   #13
Dunedain
Member
 
Registered: Jan 2004
Location: Norway
Distribution: FC12
Posts: 77

Rep: Reputation: 15
I don't see the big issue of having to type su <password> to get root permission. If I wanted to run as root I'd definitely do so without a gui.

But then I've always been doing this. Imagine some kid if someone jests that they should type "rm -rf /", that kid being lazy and logged in as root does this. Or someone compromises his/her system when that person is logged in as root.. Being root in *nix and admin in windoze is kinda different.
 
  


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
FC12: kernel panic - not syncing: vfs: Unable to mount root fs on unknown block (0,0) bkesting Fedora 9 04-11-2010 12:38 AM
Logging in as root problem Ubuntu v9.04 kngly Linux - Newbie 6 07-16-2009 12:35 AM
Logging as root / sudoer problem AceCraft Linux - Newbie 10 07-13-2009 08:43 AM
problem logging into root account pcdsi Linux - Newbie 17 05-15-2009 04:02 PM
problem logging in as root apant Linux - Newbie 3 07-03-2005 10:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 04:19 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