Re:The security hole in sudo
by TheCapn on Wednesday May 23, 2012 @11:29AM
(#4013528)
When I vi a read-only file:
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.
[ Parent
| on HN ]
> 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.