LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 04-19-2010, 07:59 AM   #1
forusword
Member
 
Registered: Apr 2010
Location: USA
Distribution: OpenSUSE
Posts: 70

Rep: Reputation: 15
sudoers on Ubuntu


I was wondering if someone had a logical reason and therefore complete, hopefully that makes total sense, for why when I install Ubuntu I cannot use the 'sudo' command either with root or user passwords. Even if I try to edit the permissions for sudoers, I still recieve an error message that says access is denied and so as the root user on my pc I don't understand why I can't put my name in the sudoers file or use the sudo command with the correct password. Thanks in advance.
 
Old 04-19-2010, 08:21 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Ubuntu has their own view of the world---at odds with all other Linux distros--and with Unix tradition.

By default, the root account is disabled. In a normal installation, you never enter a root password. You can enable the root account by entering "sudo passwd root". When doing admin tasks, however, you will still be asked for you normal user password.
Quote:
I was wondering if someone had a logical reason and therefore complete, hopefully that makes total sense
No can do--I think Ubuntu's policy is dumb!!
 
1 members found this post helpful.
Old 04-19-2010, 09:34 AM   #3
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
It is simple, really. By default, the first user created (during installation) will be allowed to run 'sudo', without restrictions (I think it's because that user is added to the 'admin' group, which has sudo permissions for ALL, i.e. everything). Like pixellany already told, root user account is sort of disabled, in the sense that by default you won't be able to log in as root the usual way. Other users (those that are created after the installation) will, by default, not be allowed to use 'sudo' for anything (the idea behind this is that the first user is "admin", the rest are not unless the admin user makes them). If you do want them to be able to use sudo for something, configure them in the sudoers file appropriately.

If you do not set a valid password for root account and mess up with sudoers file such that you disable yourself from using sudo, you're stuck with normal privileges and have to do a "workaround" to fix it: either reset root password or edit sudoers file by booting your system off a live-cd or equivalent.

I don't get what's so "bad" (except for it being against the masses, which is a dumb reason) about sudo and disabling root account. The end result is the same (except that instead of having to log on as root all the time, you type 'sudo'), equal damage can be made and only one user by default has those powers. What's different is that
1) it is easier to write instructions for new users because there is no need to log in as another user
2) "administrative" permissions can be controlled instead of ON/OFF behaviour of root vs. normal users,
3) if needed, more than one user can do tasks that require elevated rights, they can be told apart (vs. N different persons using root), and
4) it is an *addition* to the ordinary routines, not a replacement

Not being able to use 'sudo' equals to locking yourself out of root account and that's not even a problem, because most systems are insecure enough to let the situation be fixed faster than water boils for making coffee.

Last edited by b0uncer; 04-19-2010 at 09:36 AM.
 
Old 04-19-2010, 10:01 AM   #4
lupusarcanus
Senior Member
 
Registered: Mar 2009
Location: USA
Distribution: Arch
Posts: 1,022
Blog Entries: 19

Rep: Reputation: 146Reputation: 146
Ubuntu's logic behind the disabling of the root account is to protect users from themselves. That's right -- themselves -- because a simple miscue can become fatal when dealing with the root account. With root, it becomes very easy to delete or screw up anything important. It also is their to discourage -- no, disable -- newer users from getting frustrated and logging in as root all the time, instead of their regular user, and risking it all with a major security gamble.

Post /etc/sudoers, please.
 
Old 04-19-2010, 02:15 PM   #5
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Ubuntu's logic is flawed....You try to make something idiot-proof, and I promise that I will find you an idiot that can and will get around your safeguards.

So, the presumed dummy running Ubuntu reads on a forum that he can make something better by entering "sudo something"----but our hero decides to enter "sudo something else" instead. Where's the protection?

Imagine Ubuntu in the car business---suppose they decide to "protect users from themselves" by changing the pedal layout?
 
Old 04-19-2010, 04:45 PM   #6
lupusarcanus
Senior Member
 
Registered: Mar 2009
Location: USA
Distribution: Arch
Posts: 1,022
Blog Entries: 19

Rep: Reputation: 146Reputation: 146
I never said I agree with it; but that is the reason for it. Personally, as a power user, I enable it anyways. But yeah, I see your point pixellany.
 
Old 04-20-2010, 08:05 AM   #7
forusword
Member
 
Registered: Apr 2010
Location: USA
Distribution: OpenSUSE
Posts: 70

Original Poster
Rep: Reputation: 15
in retort

Quote:
Originally Posted by one of you, i'm not clicking back to reread lol
please post /etc/sudoers
I actually got frustrated not with the lack of control I was provided with this complication of the sudoers file, but instead I got frustrated at the, in agreement with another one of you, idiocy of --in contrast to what was said about the case in point-- being the user to install Ubuntu and still being locked out of not only the sudoers file for editing purposes as well as editing permissions to it in order to do the other task. Essentially it removes the personal user end of the operating system and 'thusly' (which is a ridiculous word0 I removed it and opted for Fedora which had some updating issues and I got even more frustrated and opted (once again for about the fifth time) for LFS, which provided me with read/write issues to my hard disk. Being that I was running the livecd it was impetuous and degrading as a person who knows how to use Linux at a basic level and knows there is an issue with the implementation of the OS. Therefore, until I configure the issue with LFS, I'm abandoning Linux which makes me angry too because I just paid money for this membership to the website in order to ascertain assistance, but... I can still learn! Which is good. That being not only said but digressing from the original topic, there is no /etc/sudoers to post to the forum. And even if it were there, I assure you that what I can see is not likely the issue, because what I can see it all correct except for the issue that I could not edit the file itself or permissions to the file. I agree with the idiotic logic behind 'Ubuntu' in this case scenario but I'm not knocking one of the greater Linux Distributions (from what I understand of popular distros) at all. In fact I enjoyed Ubuntu right up until I began to get not the blue screen of death, but the grey screen of death, and I'm unsure if others have suffered this issue as well.

@b0uncer, I see your point, yet I agree with the much more (and I'm not being political but philosophical in this answer) American point of view...the logic is %&#*)#@ dumb.

Thanks for your answers. I think I'm going to continue to work on the LFS issue because, it seems to be to be more customizable and thus I don't have to worry about the SELinux policies and such, sudo files as it were.

I believe I have the 6.6 edition, which I have not said. I dare take a lick at putting in the time to compile it though, as it is with an SELinux policy as well. I will have to post in the LFS forums to find the earlier archives for the original distributions. Butt for now, my belly's aching and I need something to eat, maybe a bananna and some walnuts. Thanks again! The Linux ride has been, and will continue to be FUN!
 
Old 04-20-2010, 09:05 AM   #8
lupusarcanus
Senior Member
 
Registered: Mar 2009
Location: USA
Distribution: Arch
Posts: 1,022
Blog Entries: 19

Rep: Reputation: 146Reputation: 146
Try openSUSE!
 
Old 04-20-2010, 05:12 PM   #9
Karl Godt
Member
 
Registered: Mar 2010
Location: Kiel , Germany
Distribution: once:SuSE6.2,Debian3.1, aurox9.2+3,Mandrake?,DSL? then:W7st,WVHB, #!8.10.02,PUPPY4.3.1 now:Macpup
Posts: 314

Rep: Reputation: 45
Quote:
Originally Posted by leopard View Post
Try openSUSE!
Honestly ?

SuSE 6.2 once allowed root login without password.
Now they do the password-paranoia also!
When you have to fix things after reboot after installation and want a root prompt and there is said "press enter/ok for a root-prompt" and not "root/sudoers-prompt" you might think "enter" or the password of the first (created while installation) user might do it.
I was messed up with#!8.04 and #!8.10 several times and thought I had to search for a some hidden password in a "README" or ".pwd"-script. I have now created a root and also a root for Puppy because it would not accept "enter" for root at "Cntrl+Alt+F2/F3" prompt.
And now the first thing for me after installation of any Linux will be creating and checking root passwd and checking root login enabled for the splash screen.
Educated coders who know 90 or more per cent of commands, syntaxes and appendings would not have many problems with this but as someone that does Linux as hobby and is reading something like: .$ if then;'007'} in a script that may have something to do with etc/passwd or the like, you grow the most screwed ideas!
 
Old 04-21-2010, 12:43 PM   #10
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 293Reputation: 293Reputation: 293
I can understand why the Ubuntu developers have chosen to disable the root account. I can also understand why the moderators on the Ubuntu forums forbid anyone from posting how to enable the root account on Ubuntu.
Despite the best intentions of the Ubuntu developers, there are quite a number of neophyte Ubuntu users who will enable the root account as soon as they install Ubuntu. Then they insist on running the system as root users with full on root privileges. (After all, that is how they are used to working on Windows, so why shouldn't they use linux the same way?).
As you can probably guess, very little time passes before these people run into problems that they have inadvertently brought upon themselves. They then go the the Ubuntu forums and rant about how linux will never be able compete with Windows if even a "smart guy" like me has problems ...
I read stuff like this over and over again on the Ubuntu forums.
BTW, if sudo ever breaks on Ubuntu, here is how to fix it:
http://www.psychocats.net/ubuntu/fixsudo

Last edited by tommcd; 04-21-2010 at 12:45 PM.
 
  


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
Help with sudoers DrStrangepork Linux - Newbie 8 10-13-2009 07:53 AM
Re;sudoers palisetty_suman Linux - Newbie 4 01-27-2009 11:25 PM
Ubuntu 7.10 sudoers not working depam Ubuntu 12 01-12-2008 02:58 PM
I deleted /etc/sudoers and creates a new file call sudoers but now it doesnt for visu abefroman Linux - Software 1 11-10-2005 05:03 PM
sudoers usa1234 Linux - General 1 10-24-2004 03:07 PM

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

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