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 03-06-2007, 06:56 PM   #1
DIL23
LQ Newbie
 
Registered: Mar 2007
Location: Edinburgh
Distribution: ubuntu
Posts: 9

Rep: Reputation: 0
SU vs root - Fedora 6


Hello

I'm very new to Linux so please excuse if this is a stupid question!

What is the difference between su (super user?) and root? I'm running Fedora Core 6 if I try to log in at a terminal window as root and give the password it won't give me access but if I login as su and use the root password it lets me in!!! (and seems to allow me to do most things).

Also if I use the GUI to run certain things I repeatedly get "access denied/not enough privileges" type dialog messages and must log in as root to continue (from the dialog box) - but it doesn't accept the password and I can't seem to su from the dialog boxes - where am I going wrong?

Any help appreciated!

DIL23
 
Old 03-06-2007, 07:05 PM   #2
rocket357
Member
 
Registered: Mar 2007
Location: 127.0.0.1
Distribution: OpenBSD-CURRENT
Posts: 485
Blog Entries: 160

Rep: Reputation: 74
"su" is a program to temporarily give you root priviledges. The terms "super user" and "root" mean the same thing. Logging in as root and operating as root is a bad idea (particularly as you're learning Linux), so programs like su and sudo were written to allow you to operate as a normal user and gain root priv. temporarily to accomplish some administrative task (while logged in as a normal user).

I don't know if you're familiar with Windows Vista, but Vista employs a similar mechanism to remove "admin" priv's from the default account. Unfortunately, Vista doesn't ask for the password for administrative actions, so it's somewhat pointless, but hey, at least they tried?

Last edited by rocket357; 03-06-2007 at 07:06 PM.
 
Old 03-06-2007, 07:14 PM   #3
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,977
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by rocket357
"su" is a program to temporarily give you root priviledges. The terms "super user" and "root" mean the same thing. Logging in as root and operating as root is a bad idea (particularly as you're learning Linux), so programs like su and sudo were written to allow you to operate as a normal user and gain root priv. temporarily to accomplish some administrative task (while logged in as a normal user).

I don't know if you're familiar with Windows Vista, but Vista employs a similar mechanism to remove "admin" priv's from the default account. Unfortunately, Vista doesn't ask for the password for administrative actions, so it's somewhat pointless, but hey, at least they tried?
...it won't prompt you for a password...but you can do a runas under Vista (and XP).
 
Old 03-06-2007, 07:22 PM   #4
DIL23
LQ Newbie
 
Registered: Mar 2007
Location: Edinburgh
Distribution: ubuntu
Posts: 9

Original Poster
Rep: Reputation: 0
hmmmmm....

Many thanks for the quick reply Rocket357!!

I get the point of ***REALLY*** not using root if at all possible - just don't understand why I can't log in as root. Am getting on OK with su to accomplish what I'm trying to do (with lots of trial and error <g>) - so the question is more out of interest.

But it would be useful to use the nice KDE GUI to untar and do maybe lower level admin stuff etc 'on-the-fly' as I can't log in as root thru the GUI admin apps.

...and no I'm not familiar with Windows Vista (and don't intend to be if at all possible <g>) - thus my interest in Linux!

Thanks again
DIL23
 
Old 03-06-2007, 07:24 PM   #5
rocket357
Member
 
Registered: Mar 2007
Location: 127.0.0.1
Distribution: OpenBSD-CURRENT
Posts: 485
Blog Entries: 160

Rep: Reputation: 74
Quote:
Originally Posted by custangro
...it won't prompt you for a password...but you can do a runas under Vista (and XP).
What I'm talking about is the UAC (User Account Control) security enhancement. When Vista requires administrative priviledges, it gives you a popup that you can simply click "Ok" on to gain administrator priviledges. It defeats the purpose because it won't take long for a user to get annoyed and start clicking "Ok" without checking the program that needs elevated priv...security, afterall, is only as strong as the discipline that drives it.

And yes, you can set a program to always run as administrator, but if you know anything about suid issues, you'll see why that's a bad idea (that sometimes you can't avoid on Windows and Linux both).
 
Old 03-06-2007, 07:29 PM   #6
baldwonder
Member
 
Registered: Sep 2004
Location: Florida
Distribution: Slackware, VectorLinux, FreeBSD,Xubuntu
Posts: 69

Rep: Reputation: 15
Someone correct me if I'm wrong, but the /etc/securetty file determines the TTY devices that root is allowed to log in to. I ran into a similar issue a few months back,but I can't remember what I added or uncommented. If you can su, but not log in as root, I'm guessing it has to do with what is listed in this file. You may have to add TTY devices to the list. Check out this page, which describes the file in more detail:

http://howtos.linux.com/guides/solrh...ap5sec41.shtml
 
Old 03-06-2007, 07:31 PM   #7
custangro
Senior Member
 
Registered: Nov 2006
Location: California
Distribution: Fedora , CentOS , RHEL
Posts: 1,977
Blog Entries: 1

Rep: Reputation: 209Reputation: 209Reputation: 209
Quote:
Originally Posted by rocket357
What I'm talking about is the UAC (User Account Control) security enhancement. When Vista requires administrative priviledges, it gives you a popup that you can simply click "Ok" on to gain administrator priviledges. It defeats the purpose because it won't take long for a user to get annoyed and start clicking "Ok" without checking the program that needs elevated priv...security, afterall, is only as strong as the discipline that drives it.

And yes, you can set a program to always run as administrator, but if you know anything about suid issues, you'll see why that's a bad idea (that sometimes you can't avoid on Windows and Linux both).
OHHH...my bad. I didn't realize you were talking about the UAC...sorry long day at work....

-custangro
 
Old 03-06-2007, 07:37 PM   #8
rocket357
Member
 
Registered: Mar 2007
Location: 127.0.0.1
Distribution: OpenBSD-CURRENT
Posts: 485
Blog Entries: 160

Rep: Reputation: 74
Thank you, baldwonder, I was wondering about that. I know you can disable root login via gdm (and a few other display managers?), but I don't know if gdm simply passes that configuration along to the underlying config or if gdm disallows root login itself.

What login manager are you using, DIL23?

Quote:
...and no I'm not familiar with Windows Vista (and don't intend to be if at all possible <g>) - thus my interest in Linux!
I haven't messed with Vista since RC1 was released, but as far as I'm concerned it's a waste. Running Gentoo and fluxbox requires about 50MB of memory, and fluxbox on FreeBSD seems to use even less...which is scary considering Vista sucks up 550+ MB *with nothing open*. I realize I could just go in and disable a bunch of background services, but honestly if I have to go tweaking the system on that level, why not just use a system I know I can tweak exactly how I want it?
 
Old 03-06-2007, 07:38 PM   #9
rocket357
Member
 
Registered: Mar 2007
Location: 127.0.0.1
Distribution: OpenBSD-CURRENT
Posts: 485
Blog Entries: 160

Rep: Reputation: 74
Quote:
Originally Posted by custangro
OHHH...my bad. I didn't realize you were talking about the UAC...sorry long day at work....

-custangro
Not a problem...and I hear ya there about work! heh.
 
Old 03-06-2007, 08:32 PM   #10
DIL23
LQ Newbie
 
Registered: Mar 2007
Location: Edinburgh
Distribution: ubuntu
Posts: 9

Original Poster
Rep: Reputation: 0
I'm using GRUB - if I get what you mean and KDE 3.4 as a desktop manager to log in.

DIL23
 
Old 03-06-2007, 09:01 PM   #11
rocket357
Member
 
Registered: Mar 2007
Location: 127.0.0.1
Distribution: OpenBSD-CURRENT
Posts: 485
Blog Entries: 160

Rep: Reputation: 74
Quote:
Originally Posted by DIL23
I'm using GRUB - if I get what you mean and KDE 3.4 as a desktop manager to log in.

DIL23
You're probably using KDE's default, kdm. I typically run gdm for my boxes that have a GUI, so I can't really help much here...
 
  


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 in Fedora Koop Linux - Newbie 2 10-12-2006 06:49 AM
x-windows not working as root in fedora 2 rushprabhu Linux - Software 3 03-29-2005 07:57 PM
Fedora 3 No audio CD as non root doobers Fedora 2 01-22-2005 06:07 PM
Fedora core 3 will not allow me to log in as root RonCum Fedora 2 11-25-2004 09:57 AM
Fedora install without asking for a password for root bbowlsbey Fedora - Installation 1 07-21-2004 02:01 AM

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

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