Wednesday·08·March·2006
Giving root access retroactively //at 18:59 //by abe
How often did you start to edit a file from your usual Unix user account and then noticed, that you only can save the file as root? I often did.
Sec
wrote a little tool named presto which helps in this situation on
FreeBSD. Initially only being a proof of concept tool to show that
write access to /dev/kmem is as good as
root access, the tool now has a useful purpose: Called from any editor
or other tool (e.g. via sudo), it gives
that tool super user privileges retroactively. So in vi, you just can type :!sudo
presto to save the opened file, even if only root can write to
it. (Works only with security level 0 or -1.)
Oh, and btw: Don’t use presto with Emacs. Emacs isn’t an editor for
one file…. ;-)
Tagged as: BSD, FreeBSD, Hacks, Open Source, Other Blogs, vi
0 comments // write a comment // comments off
Related stories
Comments
Your Comment
Spam Protection: To post a comment, you'll have to answer the following question: What is 23 plus 19?




