News for hackers. Stuff that matters.
Re:The security hole in sudo by lubutu on Wednesday May 23, 2012 @11:13AM (#4013423)
Sudo has authentication timeouts built in, so you don't have to type in your password (your password, not root's) every time you want to run an administrative program. Also, the fact that you have to sudo is one of the reasons why Unix is more secure than the Windows "administrator by default" approach.

As for your last point, you're complaining about nano. It would be perfectly possible for an editor to sudo when writing to disk.

Re:The security hole in sudo by jiggy2011 on Wednesday May 23, 2012 @11:21AM (#4013475)
This is something that seems to be the case on vi and emacs too, I have never seen a unix program which prompts me for sudo password at the moment that it needs to do a privileged operation rather than requiring running via sudo.
Re:The security hole in sudo by cscheid on Wednesday May 23, 2012 @12:58PM (#4013958)
On emacs, you can C-x C-f /sudo://etc/hosts and it'll do what you think that means, including prompting for your password only once in $TIMEOUT. It's the same base mechanism that lets you C-x C-f /user@host:path for remote editing through ssh.
Re:The security hole in sudo by TheCapn on Wednesday May 23, 2012 @11:29AM (#4013528)
When I vi a read-only file:

     "/etc/mail/aliases" [Read only] 36 lines, 1023 characters
Its simply a matter of remaining keen when doing admin tasks. Sure I have to close/re-open with sudo but its prompting me up front that I won't be able to save it.
Re:The security hole in sudo by anoother on Wednesday May 23, 2012 @12:27PM (#4013797)
> Sure I have to close/re-open with sudo but its prompting me up front that I won't be able to save it.

No, you don't, and yes, you will:

  :w !sudo tee %
Re:The security hole in sudo by FuzzyDunlop on Wednesday May 23, 2012 @12:15PM (#4013749)
You can do something like this instead (IIRC):

    :w !sudo tee % > /dev/null
It's a bit of a hack, but it works.
Re:The security hole in sudo by nknight on Wednesday May 23, 2012 @11:26AM (#4013503)
I have, but it was a patched version.

I think there's a sense, which I generally agree with, that random applications asking for your password is something we don't want users to get used to.

Re:The security hole in sudo by TazeTSchnitzel on Wednesday May 23, 2012 @11:27AM (#4013517)
Windows hasn't been "administrator by default" since Vista.
Re:The security hole in sudo by gnaritas on Wednesday May 23, 2012 @11:45AM (#4013611)
It's still administrator by default, they just prompt you to click ok on every administrative action, something users still do blindly.
Re:The security hole in sudo by TazeTSchnitzel on Wednesday May 23, 2012 @11:51AM (#4013636)
And Ubuntu users don't blindly enter their passwords at gksudo prompts?
Re:The security hole in sudo by gnaritas on Wednesday May 23, 2012 @03:11PM (#4014773)
Huge difference between hitting OK and typing the admin password.
Re:The security hole in sudo by TazeTSchnitzel on Wednesday May 23, 2012 @05:08PM (#4015310)
Really? Both are pretty instinctive to me, I do them with little thought. I even switch capslock on and off mid-password without thinking about it to type a capitalised portion.
Re:The security hole in sudo by gnaritas on Wednesday May 23, 2012 @11:15PM (#4016594)
Yes really. Anyone can hit ok, but not anyone knows the admin password. Someone can't walk up to your machine while you're away and install software in Linux, they can in windows. Hitting Ok is not sufficient. The point of sudo is to verify your identity, an ok prompt does not do that.
Re:The security hole in sudo by tallanvor on Wednesday May 23, 2012 @02:08PM (#4014411)
No, it's not administrator by default. The first user created is an administrator, but that user normally runs in a standard user security context. The prompt provides a temporary elevation to administrator level by use of an administrative security token associated with the account. The prompt also runs in a separate desktop to prevent malicious code from interfering with it.

If you try creating a new user through the control panel, you'll notice that the default selection is to create a standard user.

Re:The security hole in sudo by gnaritas on Wednesday May 23, 2012 @03:11PM (#4014766)
> The prompt provides a temporary elevation to administrator level by use of an administrative security token associated with the account.

Rather what I said. A borked version of sudo.