LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 10-21-2011, 02:01 AM   #1
shanky
Member
 
Registered: Aug 2011
Posts: 155

Rep: Reputation: Disabled
Question root ,sudo !!


hiii
what does it mean to login as root or use su;password..
are they both the same or different,if different then in what way is it??..did go through some pages but not clear on this topic..if someone could explain it to me ,would be great!!
thanks
 
Old 10-21-2011, 02:22 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
are you asking the difference between sudo and su? su lets you directly change to a different user by entering their password as if logging in from scratch. sudo is a framework where you can allow one user to act as a different user for a specific range of tasks without knowing their password etc, as controlled via /etc/sudoers
 
Old 10-21-2011, 02:31 AM   #3
shanky
Member
 
Registered: Aug 2011
Posts: 155

Original Poster
Rep: Reputation: Disabled
in theory i get it how su and sudo work ,but how does it work in real..still confused..sry..
 
Old 10-21-2011, 08:30 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
in real what?? you do nothing for su, for sudoers you manage /etc/sudoers.
 
Old 10-21-2011, 09:29 AM   #5
cynwulf
Senior Member
 
Registered: Apr 2005
Posts: 2,727

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
...

Last edited by cynwulf; 10-21-2011 at 02:50 PM.
 
0 members found this post helpful.
Old 10-21-2011, 10:00 AM   #6
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
Quote:
Originally Posted by caravel View Post
"sudo" is an essential program for managing administrator access in linux operating systems. Just like Internet Explorer in Windows 98, sudo is an integral and vital part of the linux kernel and removing sudo will cause the kernel to "panic".

You may read posts here and there about sudo not being necessary, but let me assure you that if you try to remove it you will probably see a BSoD (brown screen of death) error and your computer will need a reformat and reinstall.
Caravel, the OP was asking a serious question. I have seen dumber questions. Answering with downright nonsense and misleading information is not appreciated.

Sudo is a utility so you won't have to know and use the root password to do administrative tasks on a machine. It has pretty fine-grained adjustments as to which privileges a "sodoer" is entitled to.

Not installing sudo does not restrict the functionality of a computer in anyway. Even if it would, reformat/re-install of the whole OS would not be required either. This is not Windows.

Quote:
Originally Posted by caravel View Post
"sudo" is probably most well known from it's association with the "Ubuntu Operating System" a special verson of Mac OSX which runs embedded on espresso machines.
You might not like Ubuntu, neither do I. But please stick to the facts.

jlinkels
 
1 members found this post helpful.
Old 10-21-2011, 10:21 AM   #7
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
Quote:
Originally Posted by caravel View Post
"sudo" is an essential program for managing administrator access in linux operating systems. Just like Internet Explorer in Windows 98, sudo is an integral and vital part of the linux kernel and removing sudo will cause the kernel to "panic".

You may read posts here and there about sudo not being necessary, but let me assure you that if you try to remove it you will probably see a BSoD (brown screen of death) error and your computer will need a reformat and reinstall.

"sudo" is probably most well known from it's association with the "Ubuntu Operating System" a special verson of Mac OSX which runs embedded on espresso machines.
That post is pure misinformation.

sudo is not "essential". It's just another program, no different from any other. Finally, there is no such thing as a BSoD in Linux.

I really hope that post was a joke. And if so, you should have said so, because newbies will probably believe it if not for replies like this one.
 
1 members found this post helpful.
Old 10-21-2011, 01:51 PM   #8
cynwulf
Senior Member
 
Registered: Apr 2005
Posts: 2,727

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
The post was clearly satirical from the start... sadly some people took it seriously including a moderator... oh well.
 
Old 10-21-2011, 02:02 PM   #9
thezerodragon
Member
 
Registered: Apr 2009
Location: Paris, France
Distribution: Fedora 12 Constantine
Posts: 142

Rep: Reputation: 44
Quote:
"Ubuntu Operating System" a special verson of Mac OSX
Wait, what? Aren't we here to help the OP, not confuse them?

Anyway, in response to your question, shanky,

Quote:
in theory i get it how su and sudo work ,but how does it work in real..still confused..sry..
I like to use mnemonics to remember what each command does. I pretend su is an abbreviation of "switch user", so when you type in
Code:
su -
you are telling the computer switch user to "-", which is interpreted as root. You are then logged in as the root user and can issue all commands that require the authority of the root/superuser.
Code:
[root@example~] yum install yum-plugin-fastestmirror
Then I imagine that sudo stands for "super-user do" because it allows you to issue one command with root/superuser authority, without having to log in as root and is generally considered "safer" because you only have root permission for the one command you issue and are thus prevented from accidentally issuing commands as root that you might regret.
Code:
[normaluser@example~] sudo yum install yum-plugin-fastestmirror
Note that it will ask for the sudo password, which in this case is normaluser's password and not the root password. If you are denied from completeing sudo commands it's because you have to add that username to the /etc/sudoers file. Is that more clear?
 
1 members found this post helpful.
Old 10-21-2011, 02:06 PM   #10
thezerodragon
Member
 
Registered: Apr 2009
Location: Paris, France
Distribution: Fedora 12 Constantine
Posts: 142

Rep: Reputation: 44
Quote:
The post was clearly satirical
Sorry, I guess we don't have an appreciation for this sort of satire, because it was not clearly understood by several of us. Maybe it is not appropriate in a help forum where many people are ignorant enough to take it at face value.
 
1 members found this post helpful.
Old 10-21-2011, 02:06 PM   #11
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by thezerodragon View Post
I like to use mnemonics to remember what each command does. I pretend su is an abbreviation of "switch user", so when you type in
Code:
su -
you are telling the computer switch user to "-", which is interpreted as root. You are then logged in as the root user and can issue all commands that require the authority of the root/superuser.
no, that's not true, - is equivalent to -l or --login. Root is assumed when no user is provided, these things are not related.

and su stands for "substitute user", no need to invent alternatives.
 
Old 10-21-2011, 02:08 PM   #12
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
Quote:
Originally Posted by caravel View Post
The post was clearly satirical from the start... sadly some people took it seriously including a moderator... oh well.
satire? pull the other one, it's just unhelpful. I didn't take the post "seriously", I took it as petty trolling, and likely to confuse someone who doesn't realise that you're just being annoying. This is a forum for technical support, not poor quality attempts at jokes.
 
2 members found this post helpful.
Old 10-21-2011, 02:17 PM   #13
thezerodragon
Member
 
Registered: Apr 2009
Location: Paris, France
Distribution: Fedora 12 Constantine
Posts: 142

Rep: Reputation: 44
Quote:
no, that's not true, - is equivalent to -l or --login. Root is assumed when no user is provided, these things are not related.

and su stands for "substitute user", no need to invent alternatives.
I knew I didn't have it all the way right. I was trying to remember an article I had read some time ago. Thanks for correcting me.
 
Old 10-21-2011, 02:50 PM   #14
cynwulf
Senior Member
 
Registered: Apr 2005
Posts: 2,727

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
Quote:
Originally Posted by acid_kewpie View Post
satire? pull the other one, it's just unhelpful. I didn't take the post "seriously", I took it as petty trolling, and likely to confuse someone who doesn't realise that you're just being annoying. This is a forum for technical support, not poor quality attempts at jokes.
After giving it some thought I will withdraw the post to avoid any more confusion here... actually I wasn't "trolling", but let's just leave it at that...
 
1 members found this post helpful.
Old 10-21-2011, 03:05 PM   #15
Cultist
Member
 
Registered: Feb 2010
Location: Georgia
Distribution: Slackware64 14.2
Posts: 779

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by acid_kewpie View Post

and su stands for "substitute user", no need to invent alternatives.
um, isn't it short for superuser?
 
  


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
sudo cd /root gives 'sudo: cd: command not found'. stf92 Linux - Newbie 4 03-03-2012 09:05 AM
[SOLVED] sudo:must be setuid root rahulkya Linux - Software 7 02-21-2011 03:25 PM
Sudo Password for Root, not Going? Novatian Fedora 12 11-10-2010 02:16 AM
Can't use sudo, only account that's not root is not a sudo'ers [Ubuntu 9.10] randyriver10 Linux - Desktop 1 01-09-2010 07:56 PM
Sudo, su and root lesleyb Linux - Security 3 10-18-2004 01:36 PM

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

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

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