5 ms·
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 p
by lubutu 14y ago
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.
- jiggy2011 14y agoThis 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.
- nknight 14y agoI 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.
- TheCapn 14y agoWhen 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.
- FuzzyDunlop 14y agoYou can do something like this instead (IIRC): :w !sudo tee % > /dev/null It's a bit of a hack, but it works.
- anoother 14y ago> 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 %
- cscheid 14y agoOn 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.
- TazeTSchnitzel 14y agoWindows hasn't been "administrator by default" since Vista.
- gnaritas 14y agoIt's still administrator by default, they just prompt you to click ok on every administrative action, something users still do blindly.
- TazeTSchnitzel 14y agoAnd Ubuntu users don't blindly enter their passwords at gksudo prompts?
- gnaritas 14y agoHuge difference between hitting OK and typing the admin password.
- TazeTSchnitzel 14y agoReally? 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.
- gnaritas 14y agoYes 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.
- tallanvor 14y agoNo, 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.