Newbie trying to access SU in Ubuntu

  • Follow


Hello,
I'm new to Linux, and I'm trying to find my way around the OS.  The
system won't allow me to log in as SU because I don't have a password
for SU.  Does anyone know the default password for SU?
0
Reply fletchbites (2) 2/16/2010 2:24:59 PM

On Tue, 16 Feb 2010 06:24:59 -0800, FBWNDR wrote:

> Does anyone know the default password for SU?

Nobody knows, because you have not set one.

To set the password for root, you can just type

       sudo passwd

then enter your own user's password and then, twice,
the chosen password for root.

Otherwise just do

       sudo su -

to get a login shell as root.
0
Reply miller (474) 2/16/2010 2:36:57 PM


On Feb 16, 7:36=A0am, J G Miller <mil...@yoyo.ORG> wrote:
> On Tue, 16 Feb 2010 06:24:59 -0800, FBWNDR wrote:
> > Does anyone know the default password for SU?
>
> Nobody knows, because you have not set one.
>
> To set the password for root, you can just type
>
> =A0 =A0 =A0 =A0sudo passwd
>
> then enter your own user's password and then, twice,
> the chosen password for root.
>
> Otherwise just do
>
> =A0 =A0 =A0 =A0sudo su -
>
> to get a login shell as root.

thanks
0
Reply fletchbites (2) 2/16/2010 2:39:06 PM

* 2010-02-16 15:36 (+0100), J. G. Miller wrote:

> Otherwise just do
>
>        sudo su -
>
> to get a login shell as root.

"sudo -i" does very much the same and doesn't require root's password.
0
Reply tlikonen (145) 2/16/2010 2:57:50 PM

FBWNDR writes:
> I'm new to Linux, and I'm trying to find my way around the OS.  The
> system won't allow me to log in as SU because I don't have a password
> for SU.

I think you mean that you want to log in as root but that you can't
because you don't have the root password.  That is because the default
Ubuntu configuration has no root password.  However, you don't need it
anyway.  You can run commands as root by typing "sudo command" where
"command" is the command you need to run as root and then responding
with your own password.  With this you can accomplish everything you
could by logging in as root.  Others have explained how to set a root
password.  Don't do it.

> Does anyone know the default password for SU?

There is, of course, no default password.  The Ubuntu developers are not
fools.

I suggest that you visit one of the Ubuntu forums.  You will find lots
of beginner help there.
-- 
John Hasler 
jhasler@newsguy.com
Dancing Horse Hill
Elmwood, WI USA
0
Reply jhasler (209) 2/16/2010 4:08:45 PM

John Hasler <jhasler@newsguy.com> wrote in 
news:87wrydxiwi.fsf@thumper.dhh.gt.org:

> Ubuntu configuration has no root password.  However, you don't need it
> anyway.  You can run commands as root by typing "sudo command" where
> "command" is the command you need to run as root and then responding
> with your own password.  With this you can accomplish everything you
> could by logging in as root.  Others have explained how to set a root
> password.  Don't do it.
> 

Is it inherently safer to run commands as sudo root than after su'ing to 
root? Just curious. WHat's the reason not to set a root password?

-- 
Rahul
0
Reply nospam59 (9740) 2/17/2010 6:37:38 PM

> Is it inherently safer to run commands as sudo root than after su'ing
> to root? Just curious. WHat's the reason not to set a root password?

The lack of a root password prevents new users from following their
Windows habit and running as root at all times.
-- 
John Hasler 
jhasler@newsguy.com
Dancing Horse Hill
Elmwood, WI USA
0
Reply jhasler (209) 2/17/2010 6:55:13 PM

At Wed, 17 Feb 2010 18:37:38 +0000 (UTC) Rahul <nospam@nospam.invalid> wrote:

> 
> John Hasler <jhasler@newsguy.com> wrote in 
> news:87wrydxiwi.fsf@thumper.dhh.gt.org:
> 
> > Ubuntu configuration has no root password.  However, you don't need it
> > anyway.  You can run commands as root by typing "sudo command" where
> > "command" is the command you need to run as root and then responding
> > with your own password.  With this you can accomplish everything you
> > could by logging in as root.  Others have explained how to set a root
> > password.  Don't do it.
> > 
> 
> Is it inherently safer to run commands as sudo root than after su'ing to 
> root? Just curious. WHat's the reason not to set a root password?

The same reason wood stoves are not made out of wood or include seats...

With sudo set up, there is no reason to ever log in as root.  The
Ubuntu people figured that if root had an actual password, newbies
would log in as root and go web surfing or something.  The war Ubuntu
is setup, you cannot do that.  Instead, anything that does need
privilege requires the user to enter *his* (or her) password at a
special prompt -- eg firing up a Terminal and doing 'sudo <mumble>' or
launching a GUI app using gksudo or something like that.

The way sudo is 'safer' in that it is a privilege-on-demand sort of
thing: you do a privileged thing rarely and each time you enter a
password.  You won't be logged in at privileged state and do stuff
that does not need privilege.  This avoids accidents and what not.

> 

-- 
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Download the Model Railroad System
http://www.deepsoft.com/  -- Binaries for Linux and MS-Windows
heller@deepsoft.com       -- http://www.deepsoft.com/ModelRailroadSystem/
                                                                                                   
0
Reply heller (2930) 2/17/2010 8:37:52 PM

On 2010-02-17, Rahul <nospam@nospam.invalid> wrote:
> John Hasler <jhasler@newsguy.com> wrote in 
> news:87wrydxiwi.fsf@thumper.dhh.gt.org:
>
>> Ubuntu configuration has no root password.  However, you don't need it
>> anyway.  You can run commands as root by typing "sudo command" where
>> "command" is the command you need to run as root and then responding
>> with your own password.  With this you can accomplish everything you
>> could by logging in as root.  Others have explained how to set a root
>> password.  Don't do it.
>> 
>
> Is it inherently safer to run commands as sudo root than after su'ing to 
> root? Just curious. WHat's the reason not to set a root password?
>

I presume that you CAN give root a password and log on as root.

sudo passwd
for example or 
sudo vi /etc/shadow
and copy over your user password, and then log on as root and put in a
real root password. Or do they nanny you so much as to make this
impossible ( eg run a cron job every minute which checks if root has a
password and zeros it out.)
0
Reply unruh3 (389) 2/17/2010 8:41:59 PM

On 2010-02-17, John Hasler <jhasler@newsguy.com> wrote:
>> Is it inherently safer to run commands as sudo root than after su'ing
>> to root? Just curious. WHat's the reason not to set a root password?
>
> The lack of a root password prevents new users from following their
> Windows habit and running as root at all times.

Sure. And if you unplug the computer, you cannot engage in lots of other
bad habits. But then, is the purpose of a computer to lock you into
obeying a set of rules, or for getting a job done. Education is a lot
better than ankle-irons.

0
Reply unruh3 (389) 2/17/2010 8:43:56 PM

unruh wrote:

> On 2010-02-17, Rahul <nospam@nospam.invalid> wrote:
>> John Hasler <jhasler@newsguy.com> wrote in
>> news:87wrydxiwi.fsf@thumper.dhh.gt.org:
>>
>>> Ubuntu configuration has no root password.  However, you don't need it
>>> anyway.  You can run commands as root by typing "sudo command" where
>>> "command" is the command you need to run as root and then responding
>>> with your own password.  With this you can accomplish everything you
>>> could by logging in as root.  Others have explained how to set a root
>>> password.  Don't do it.
>>> 
>>
>> Is it inherently safer to run commands as sudo root than after su'ing to
>> root? Just curious. WHat's the reason not to set a root password?
>>
> 
> I presume that you CAN give root a password and log on as root.
> 
> sudo passwd
> for example or
> sudo vi /etc/shadow
> and copy over your user password, and then log on as root and put in a
> real root password. Or do they nanny you so much as to make this
> impossible ( eg run a cron job every minute which checks if root has a
> password and zeros it out.)

or My favorite --->  sudo sed -i 's|root:!:|root::|' /etc/shadow


0
Reply GangGreene8788 (25) 2/17/2010 9:29:00 PM

On 2010-02-17, unruh <unruh@wormhole.physics.ubc.ca> wrote:
>
> Sure. And if you unplug the computer, you cannot engage in lots of other
> bad habits. But then, is the purpose of a computer to lock you into
> obeying a set of rules, or for getting a job done. Education is a lot
> better than ankle-irons.

This can work both ways.  For example, you don't (usually) teach a kid
to ride a bicycle by throwing him out on an adult bike--you get him a
kid bike with training wheels.  Think of no-root-password as training
wheels.

Some users won't want the training wheels, in which case they can still
take them off (sudo passwd root).

--keith

-- 
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information

0
Reply kkeller-usenet (1289) 2/17/2010 9:37:31 PM

At Wed, 17 Feb 2010 20:43:56 GMT unruh <unruh@wormhole.physics.ubc.ca> wrote:

> 
> On 2010-02-17, John Hasler <jhasler@newsguy.com> wrote:
> >> Is it inherently safer to run commands as sudo root than after su'ing
> >> to root? Just curious. WHat's the reason not to set a root password?
> >
> > The lack of a root password prevents new users from following their
> > Windows habit and running as root at all times.
> 
> Sure. And if you unplug the computer, you cannot engage in lots of other
> bad habits. But then, is the purpose of a computer to lock you into
> obeying a set of rules, or for getting a job done. Education is a lot
> better than ankle-irons.

True.  The RedHat/Fedora/CentOS install process asks for a root
password.  Then during the First Boot process they ask you to create a
normal user.  It is easy to skip the normal user creation process and
just log in as root (but it is a bad to do so).  I'm guessing Ubuntu's
install process skips the root password process and instead creates a
normal user w/ sudo access.  Note: MacOSX's first time setup does much
the same thing.  For normal/newbie users this is probably a reasonable
and 'safe' thing to do.  It is possible on Ubuntu to create a real root
password (I *guess* this is also possible with MacOSX as well).  And I
suppose that for some level of *experienced* user this might make
sense. Ubuntu does not *prevent* you from doing this, it simply does
not do it by default.  For normal users, there is no need to log in as
root.  Actually, since the 'invention' of sudo, there has not been a
real need to log in as root on any UNIX or UNIX-like system.  Old
school types still do, mostly out of habit.

The real question is not 'WHat's the reason not to set a root
password?', but 'WHat's the reason TO to set a root password?'.

> 
>                                                                                                                      

-- 
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Download the Model Railroad System
http://www.deepsoft.com/  -- Binaries for Linux and MS-Windows
heller@deepsoft.com       -- http://www.deepsoft.com/ModelRailroadSystem/
                                                                                                                          
0
Reply heller (2930) 2/17/2010 9:46:24 PM

I wrote:
> The lack of a root password prevents new users from following their
> Windows habit and running as root at all times.

Bill Unruh writes:
> And if you unplug the computer, you cannot engage in lots of other bad
> habits. But then, is the purpose of a computer to lock you into
> obeying a set of rules, or for getting a job done. Education is a lot
> better than ankle-irons.

Education is readily available.  New users who avail themselves of it
soon learn how set a root password.  First, though, they learn not to
run as root all the time.  Users who can't arse themselves to learn a
little bit never learn how to run as root.
-- 
John Hasler 
jhasler@newsguy.com
Dancing Horse Hill
Elmwood, WI USA
0
Reply jhasler (209) 2/17/2010 9:54:15 PM

Bill Unruh writes:
> I presume that you CAN give root a password and log on as root.

Yes, of course you can.  So can the new user, once he learns how.
-- 
John Hasler 
jhasler@newsguy.com
Dancing Horse Hill
Elmwood, WI USA
0
Reply jhasler (209) 2/17/2010 9:57:54 PM

On 2010-02-17, GangGreene <GangGreene@example.com> wrote:
> unruh wrote:
>
>> On 2010-02-17, Rahul <nospam@nospam.invalid> wrote:
>>> John Hasler <jhasler@newsguy.com> wrote in
>>> news:87wrydxiwi.fsf@thumper.dhh.gt.org:
>>>
>>>> Ubuntu configuration has no root password.  However, you don't need it
>>>> anyway.  You can run commands as root by typing "sudo command" where
>>>> "command" is the command you need to run as root and then responding
>>>> with your own password.  With this you can accomplish everything you
>>>> could by logging in as root.  Others have explained how to set a root
>>>> password.  Don't do it.
>>>> 
>>>
>>> Is it inherently safer to run commands as sudo root than after su'ing to
>>> root? Just curious. WHat's the reason not to set a root password?
>>>
>> 
>> I presume that you CAN give root a password and log on as root.
>> 
>> sudo passwd
>> for example or
>> sudo vi /etc/shadow
>> and copy over your user password, and then log on as root and put in a
>> real root password. Or do they nanny you so much as to make this
>> impossible ( eg run a cron job every minute which checks if root has a
>> password and zeros it out.)
>
> or My favorite --->  sudo sed -i 's|root:!:|root::|' /etc/shadow

Just in case someone does not realise what this does, it removes all
passwords from root, and allows anyone in the world to log onto your
machine as root. 


>
>
0
Reply unruh3 (389) 2/17/2010 10:12:02 PM

On 2010-02-17, unruh <unruh@wormhole.physics.ubc.ca> wrote:


> obeying a set of rules, or for getting a job done. Education is a lot
> better than ankle-irons.

BINGO!

Linux is about choice.  Giving you no root access or information about
how it works is not choice.  

nb
0
Reply notbob (921) 2/17/2010 10:42:50 PM

On Wed, 17 Feb 2010 14:37:52 -0600, Robert Heller wrote:

> This avoids accidents and what not.

Like

      sudo rm -fr / some_directory_temporary_directory

0
Reply miller (474) 2/17/2010 10:45:24 PM

On 2010-02-17, Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us> wrote:

> This can work both ways.  

Not if you're not given both options.

> For example, you don't (usually) teach a kid
> to ride a bicycle by throwing him out on an adult bike--you get him a
> kid bike with training wheels.  

Horse crap.  I learned to ride a full sized girls bike, my ass perched
on the hefty chain guard or jes standing on the peddles, the front of
the seat poking me in the middle of my back.  It was scary, but I did
it.

> Think of no-root-password as training
> wheels.

You think of it that way.  I think it's linux fer wimps.

> Some users won't want the training wheels, in which case they can still
> take them off (sudo passwd root).

That's more like it.  But, how will they know if they are not given
the option in the first place?

nb

0
Reply notbob (921) 2/17/2010 10:47:53 PM

On Wed, 17 Feb 2010 22:47:53 +0000, NotBob wrote:

> But, how will they know if they are not given the
> option in the first place?

But the option is there with "sudo passwd" and if you just do a simple
web search you can find this information or even if you bothered to
look in the release documentation.
0
Reply miller (474) 2/17/2010 11:01:06 PM

On 2010-02-17, notbob <notbob@nothome.com> wrote:
> On 2010-02-17, Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us> wrote:
>
>> Some users won't want the training wheels, in which case they can still
>> take them off (sudo passwd root).
>
> That's more like it.  But, how will they know if they are not given
> the option in the first place?

Anyone who can't find this option with a 30 second Google search doesn't
deserve to have the training wheels taken off.  ;-)

Look, people pick Ubuntu for a reason.  If they want a distro that's not
"linux for wimps" they have plenty of other options.

--keith

-- 
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information

0
Reply kkeller-usenet (1289) 2/17/2010 11:41:06 PM

On 2010-02-17, Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us> wrote:
> On 2010-02-17, notbob <notbob@nothome.com> wrote:
>> On 2010-02-17, Keith Keller <kkeller-usenet@wombat.san-francisco.ca.us> wrote:
>>
>>> Some users won't want the training wheels, in which case they can still
>>> take them off (sudo passwd root).
>>
>> That's more like it.  But, how will they know if they are not given
>> the option in the first place?
>
> Anyone who can't find this option with a 30 second Google search doesn't
> deserve to have the training wheels taken off.  ;-)
>
> Look, people pick Ubuntu for a reason.  If they want a distro that's not
> "linux for wimps" they have plenty of other options.
>

Actually you have become arrogant with knowledge. If you are a naive
user, what do you google for? Recall that it is passwd, not password (
which is the what most people would associate with passwords).
Linux/Unix is a really arcane set of spells. It acts like the image of
necromancers in the past-- you have to go through a series of words and
deeds, in exactly the right order and in exactly the right form to get
anything done. If you mess up one little letter you could find that y ou
have destroyed everything. (look at that previous example
sudo rm -r /tmp/private, vs sudo rm -r / tmp/private. 

One tiny little space. 
googling is great if you have some idea what you are looking for. If
not, it is a complete mess. 




>
0
Reply unruh3 (389) 2/18/2010 1:31:17 AM

At Wed, 17 Feb 2010 23:45:24 +0100 J G Miller <miller@yoyo.ORG> wrote:

> 
> On Wed, 17 Feb 2010 14:37:52 -0600, Robert Heller wrote:
> 
> > This avoids accidents and what not.
> 
> Like
> 
>       sudo rm -fr / some_directory_temporary_directory

Yes, one can shoot yourself in the foot using sudo.  It is just every so
slightly harder to do so.

> 
>                   

-- 
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Download the Model Railroad System
http://www.deepsoft.com/  -- Binaries for Linux and MS-Windows
heller@deepsoft.com       -- http://www.deepsoft.com/ModelRailroadSystem/
                                                   
0
Reply heller (2930) 2/18/2010 1:51:03 AM

Robert Heller <heller@deepsoft.com> wrote in
news:DuidnTmW59w9zuHWnZ2dnUVZ_gGdnZ2d@posted.localnet: 

> The same reason wood stoves are not made out of wood or include
> seats... 
> 
> With sudo set up, there is no reason to ever log in as root.  The
> Ubuntu people figured that if root had an actual password, newbies
> would log in as root and go web surfing or something.  The war Ubuntu
> is setup, you cannot do that.  Instead, anything that does need
> privilege requires the user to enter *his* (or her) password at a
> special prompt -- eg firing up a Terminal and doing 'sudo <mumble>' or
> launching a GUI app using gksudo or something like that.
> 

Wow! I didn't realize this was such a controversial topic. Let me
clarify: I wasn't saying one has to surf the web and do day-to-day stuff
as root. 

But let's say a user once in a while needs to, say, create a new mount
point. Or restart a service. Or change an iptables entry. Why not then
just "su -" make the change and log out. How is this workflow any more
dangerous than "sudo foo_dangerous_operation"? 

To me the main reason to use sudo always seemed to be to delegate a
subset of tasks that normally required root previlages to a ordinary
user. On a multi-user multi-admin server say someone controls httpd or
another guy something else etc. Sort of creating tiny less-powerful
mini-roots. But it still means there is at least one person who is "all
powerful" "root". 

If one gets used to doing "sudo foo" every so often it's likely that one
stops thinking about that and it becomes a reflex action. So then one is
as likely to do mistakes without realizing it. 

Analogies:

(a) Aliasing rm to "rm -i". I got conditioned in a month to always type
"rm -f foobar" 

(b) The annoying Windoze habit of asking a y/n for every small thing. By
default I press the y without even thinking 

Just my thoughts....

-- 
Rahul
0
Reply nospam59 (9740) 2/18/2010 3:17:14 AM

Robert Heller <heller@deepsoft.com> wrote in 
news:DuidnTmW59w9zuHWnZ2dnUVZ_gGdnZ2d@posted.localnet:

> The way sudo is 'safer' in that it is a privilege-on-demand sort of
> thing: 

Yes, but that's like security by obscurity. If the privilage demander and 
privalage granter are the same what's the point in making him beg each 
time.

>you do a privileged thing rarely and each time you enter a
> password.  You won't be logged in at privileged state and do stuff
> that does not need privilege.  This avoids accidents and what not.

By that extension soon ubuntu might be making user solve captchas (or 
worse) to do tasks needing previlage escalation.  



-- 
Rahul
0
Reply nospam59 (9740) 2/18/2010 3:24:49 AM

John Hasler <jhasler@newsguy.com> wrote in 
news:87sk8zwmt4.fsf@thumper.dhh.gt.org:

> Education is readily available.  New users who avail themselves of it
> soon learn how set a root password.  First, though, they learn not to
> run as root all the time.  Users who can't arse themselves to learn a
> little bit never learn how to run as root.
> 

I agree and in another sense:

(a) If a user is really controlling an "important" server he is probably 
educated enough to not use root logins for trivial tasks.

(b) If it is my grandma on her ubuntu PC and she accidently wipes out the 
root partition as root I doubt the world's coming to an end anyways!

By not letting users get a taste of the "real" root one only insulates them 
from reality.

-- 
Rahul
0
Reply nospam59 (9740) 2/18/2010 3:27:36 AM

On 2010-02-18, unruh <unruh@wormhole.physics.ubc.ca> wrote:
>
> Actually you have become arrogant with knowledge. If you are a naive
> user, what do you google for? Recall that it is passwd, not password (
> which is the what most people would associate with passwords).

I'm not impressed with this argument.  The naive Ubuntu user might enter
this query:

http://www.google.com/search?q=administrator+password+ubuntu

Even this:

http://www.google.com/search?q=+password+ubuntu

gets you to what you need if you have no idea what the admin account is
named.

If that's arrogance, I'm content with the label.

--keith

-- 
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information

0
Reply kkeller-usenet (1289) 2/18/2010 3:47:03 AM

On 2010-02-18, Rahul <nospam@nospam.invalid> wrote:
>
> But let's say a user once in a while needs to, say, create a new mount
> point. Or restart a service. Or change an iptables entry. Why not then
> just "su -" make the change and log out. How is this workflow any more
> dangerous than "sudo foo_dangerous_operation"? 

Two reasons:

--you've just typed in the root password; if someone has installed a
keyboard sniffer they now have the root password.  (Yes, if you do sudo
blah they've sniffed your own password and can do sudo su and accomplish
the same thing.)

--More importantly, su - leaves open a root shell, wherein you might
accidentally type in a dangerous command.  sudo foo brings you back to a
normal shell, where you'd need to sudo again to type in a dangerous
command.

That said, I generally su -, and log out as soon as I'm done.

> To me the main reason to use sudo always seemed to be to delegate a
> subset of tasks that normally required root previlages to a ordinary
> user. On a multi-user multi-admin server say someone controls httpd or
> another guy something else etc. Sort of creating tiny less-powerful
> mini-roots. But it still means there is at least one person who is "all
> powerful" "root". 

There can always be one person who is root without needing the root
password, if that person can sudo su.

> (a) Aliasing rm to "rm -i". I got conditioned in a month to always type
> "rm -f foobar" 

I always unalias rm rather than allow myself to be conditioned.

> (b) The annoying Windoze habit of asking a y/n for every small thing. By
> default I press the y without even thinking 

Example (besides rm -i)?  I don't know many utilities and programs I use
on a regular basis that have excessive prompting.

--keith

-- 
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information

0
Reply kkeller-usenet (1289) 2/18/2010 3:52:58 AM

On Wednesday 17 February 2010 22:46 in comp.os.linux.misc, somebody
identifying as Robert Heller wrote...

> The real question is not 'WHat's the reason not to set a root
> password?', but 'WHat's the reason TO to set a root password?'.

The use of /sudo/ with the user's own password or eventually without a
password is actually a security risk.  If your user account is
compromised, this will allow the attacker to obtain root privileges
instantly by invoking...

        sudo su -

Presto, you have a root shell.  Set a root password and set up /sudo/ to
require the root password (or abandon /sudo/ in favor of /su/ instead),
and suddenly the attacker needs to guess an extra password.

The good thing about /sudo/ is that it offers some rudimentary
role-based access control.  You can define what privileged commands (or
what commands executed as a different unprivileged user) a regular user
account has at their disposal via /sudo/ without having to give them
complete root access.  

In my humble opinion, this role-based access control was probably
what /sudo/ was developed for in the first place.  Most distributions
however do it all wrong and default to /sudo/ as a replacement for /su/
while they at the same time also set up unprivileged user accounts with
lots of privileged commands via the policykit.  No password needed in
order to issue...

        reboot

        halt

        poweroff

        suspend

.... et al.  Sure, there are arguments in favor of that - one of them
being that these commands should normally only be available to the user
sitting at the local console, and surely, a laptop isn't a server
either.

My approach has for a long time already always been to disable all
direct root logins, both at the local console and remotely, and to
force the use of /su/ - which is only available (if properly
configured) to the users in the "wheel" group.

Personally, I think that Ubuntu and siblings, considering that they are
primarily aimed at the newbie, may not be so terribly evil in their way
of setting up /sudo/ because then at the very least, they are
familiarizing the user with the fact that some things do take elevated
privileges and that a normal user account does not have these.  

Yet, there should be proper documentation supplied with the system on
how the /sudo/ approach in these particular distributions is only
intended to familiarize the newbie with the concepts of UNIX, and that
for good measure, they should change the security implementations on
their systems - preferably with accompanying instructions - once
they'll have become more experienced.

(Note: Just like Google should tell Google Groups users that Google
Groups is not Usenet, but only an interface to it.  Omission of
documentation or information can be a form of "telling a lie", because
this omission can lead to a totally erroneous understanding of the
concepts.  I believe that /sudo/ should be documented similarly in
distributions such as Ubuntu which use the mechanism as their default
for executing privileged tasks.)

Just my two cents.

-- 
*Aragorn*
(registered GNU/Linux user #223157)
0
Reply aragorn (581) 2/18/2010 7:18:52 AM

On Thursday 18 February 2010 04:52 in comp.os.linux.misc, somebody
identifying as Keith Keller wrote...

> On 2010-02-18, Rahul <nospam@nospam.invalid> wrote:
>>
>> But let's say a user once in a while needs to, say, create a new
>> mount point. Or restart a service. Or change an iptables entry. Why
>> not then just "su -" make the change and log out. How is this
>> workflow any more dangerous than "sudo foo_dangerous_operation"?
> 
> Two reasons:
> 
> --you've just typed in the root password; if someone has installed a
> keyboard sniffer they now have the root password.  (Yes, if you do
> sudo blah they've sniffed your own password and can do sudo su and
> accomplish the same thing.)

This is false logic, I'm afraid.  Anyone with the authority to install
software on the system which can sniff the keyboard input from an
unprivileged user would already have to have root privileges in the
first place to get this malicious software to install, and would not
even need to phish for the root password - nor for the unprivileged
user account's password, since they can set a new one with...

        passwd $USERNAME_HERE

They could then even get by unnoticed by making backup copies
of "/etc/passwd" and "/etc/shadow" first before setting the new
password on the unprivileged user account, and restoring the backup
copies after "the job is done".

On the other hand, there is also the scenario where elevated permissions
are needed, but where - through some clever scripting - an innocent
looking dialog pops up, asking the user for his own password again, and
which then installs some malware on the system.

/sudo/ was not really designed to be a replacement for /su/ - see my
other reply in this thread - but rather as a way to offer some kind of
role-based access control with a limited subset of elevated
permissions, or perhaps so that a certain application could be executed
as a different, non-root user account.

But we all know that lots of things are not being used for what they
were actually designed... ;-)

-- 
*Aragorn*
(registered GNU/Linux user #223157)
0
Reply aragorn (581) 2/18/2010 7:29:55 AM

At Thu, 18 Feb 2010 03:17:14 +0000 (UTC) Rahul <nospam@nospam.invalid> wrote:

> 
> Robert Heller <heller@deepsoft.com> wrote in
> news:DuidnTmW59w9zuHWnZ2dnUVZ_gGdnZ2d@posted.localnet: 
> 
> > The same reason wood stoves are not made out of wood or include
> > seats... 
> > 
> > With sudo set up, there is no reason to ever log in as root.  The
> > Ubuntu people figured that if root had an actual password, newbies
> > would log in as root and go web surfing or something.  The war Ubuntu
> > is setup, you cannot do that.  Instead, anything that does need
> > privilege requires the user to enter *his* (or her) password at a
> > special prompt -- eg firing up a Terminal and doing 'sudo <mumble>' or
> > launching a GUI app using gksudo or something like that.
> > 
> 
> Wow! I didn't realize this was such a controversial topic. Let me
> clarify: I wasn't saying one has to surf the web and do day-to-day stuff
> as root. 
> 
> But let's say a user once in a while needs to, say, create a new mount
> point. Or restart a service. Or change an iptables entry. Why not then
> just "su -" make the change and log out. How is this workflow any more
> dangerous than "sudo foo_dangerous_operation"? 

The key phrase here is 'and log out'.  It is all to easy to *forget* to
log out of the root shell.  With sudo, you are (generally) NOT logging
into a root shell (one rarely does 'sudo su' or 'sudo bash').

> 
> To me the main reason to use sudo always seemed to be to delegate a
> subset of tasks that normally required root previlages to a ordinary
> user. On a multi-user multi-admin server say someone controls httpd or
> another guy something else etc. Sort of creating tiny less-powerful
> mini-roots. But it still means there is at least one person who is "all
> powerful" "root". 
> 
> If one gets used to doing "sudo foo" every so often it's likely that one
> stops thinking about that and it becomes a reflex action. So then one is
> as likely to do mistakes without realizing it. 

This is true of most 'dangerious' activities.  NOBODY is claiming sudo
is absolutely 'safe'.  It is just 'safer'.  Like having guns with
safteys -- the saftey does not make the gun 'safe' -- one still needs to
learn how to safely handle the gun.

> 
> Analogies:
> 
> (a) Aliasing rm to "rm -i". I got conditioned in a month to always type
> "rm -f foobar" 
> 
> (b) The annoying Windoze habit of asking a y/n for every small thing. By
> default I press the y without even thinking 
> 
> Just my thoughts....
> 

-- 
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Download the Model Railroad System
http://www.deepsoft.com/  -- Binaries for Linux and MS-Windows
heller@deepsoft.com       -- http://www.deepsoft.com/ModelRailroadSystem/
                               
0
Reply heller (2930) 2/18/2010 12:38:32 PM

unruh <unruh@wormhole.physics.ubc.ca> wrote in 
news:slrnhnp635.dii.unruh@wormhole.physics.ubc.ca:

> One tiny little space. 
> googling is great if you have some idea what you are looking for. If
> not, it is a complete mess. 
> 

Effective googling is an art. In today's world  quite an important skill. 
One always has *some* idea what one is looking for but often not the exact 
word (s) I guess.

-- 
Rahul 
0
Reply nospam233 (101) 2/18/2010 4:38:36 PM

On 2010-02-18, Aragorn <aragorn@chatfactory.invalid> wrote:
>
> This is false logic, I'm afraid.  Anyone with the authority to install
> software on the system which can sniff the keyboard input from an
  ^^^^^^^^
> unprivileged user

What about a hardware sniffer?  You can imagine someone sneaking in to
an open office space and attaching a keyboard sniffer (perhaps it also
connects to the local LAN, so that no software intervention is required
at all).  If he's smart, nobody will ever know till it's too late.

Is this at all likely?  No, not really.  But it is *possible*.

--keith

-- 
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information

0
Reply kkeller-usenet (1289) 2/18/2010 6:38:08 PM

On 2010-02-18, Rahul <nospam@invalid.invalid> wrote:
> unruh <unruh@wormhole.physics.ubc.ca> wrote in 
> news:slrnhnp635.dii.unruh@wormhole.physics.ubc.ca:
>
>> One tiny little space. 
>> googling is great if you have some idea what you are looking for. If
>> not, it is a complete mess. 
>
> Effective googling is an art. In today's world  quite an important skill. 
> One always has *some* idea what one is looking for but often not the exact 
> word (s) I guess.

In general this is true.  For the example cited, I think I showed that a
quite naive google search would turn up an answer in 30 seconds or less
(depending on the speed of your network link).  I try very hard to be
patient with people who come with a question that seems like it should be
answered by Google, but when I attempt it the search is nontrivial.  But
I don't think this is one of those examples.

--keith

-- 
kkeller-usenet@wombat.san-francisco.ca.us
(try just my userid to email me)
AOLSFAQ=http://www.therockgarden.ca/aolsfaq.txt
see X- headers for PGP signature information

0
Reply kkeller-usenet (1289) 2/18/2010 6:40:48 PM

On Thu, 18 Feb 2010 08:29:55 +0100, Aragorn wrote:

>  Anyone with the authority to install software on the system which
> can sniff the keyboard input from an unprivileged user would already
> have to have root privileges in the first place to get this malicious
> software to install

Not necessarily.  If for some reason the luser had been encourage to
type

       xhost + <somehost>

and the cracker was present on <somehost> was either local or
X was running with tcp connections allowed, and with his own copy of
that X program which shows everything on a users display and can
log keypresses (cannot recall the name at the moment) then the
cracker would be able to get the passsword.

> But we all know that lots of things are not being used for what they
> were actually designed... ;-)

Understatement of the millenia  ;)

0
Reply miller (474) 2/18/2010 9:39:04 PM

On 2010-02-18, Aragorn <aragorn@chatfactory.invalid> wrote:
> On Wednesday 17 February 2010 22:46 in comp.os.linux.misc, somebody
> identifying as Robert Heller wrote...
>
>> The real question is not 'WHat's the reason not to set a root
>> password?', but 'WHat's the reason TO to set a root password?'.
>
> The use of /sudo/ with the user's own password or eventually without a
> password is actually a security risk.  If your user account is
> compromised, this will allow the attacker to obtain root privileges
> instantly by invoking...
>
>         sudo su -

It depends on the commands allowed by the entries in sudoers.  On
the systems I adminster, ordinary users are allowed to reboot and
shut down without entering a password.  They can't get to a
general root shell.

-- 
Robert Riches
spamtrap42@verizon.net
(Yes, that is one of my email addresses.)
0
Reply spamtrap42 (1175) 2/19/2010 5:35:37 AM

35 Replies
59 Views

(page loaded in 0.551 seconds)

Similiar Articles:















7/16/2012 9:34:15 AM


Reply: