Unix administration - Re: Beginner Question: Allowing sudo to vi hosts file

This is Interesting: Free IT Magazines  
Home > Archive > Unix administration > August 2006 > Re: Beginner Question: Allowing sudo to vi hosts file





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: Beginner Question: Allowing sudo to vi hosts file
Michael Paoli

2006-08-12, 7:19 pm

Michael Paoli wrote:
> underh20.scubadiving@gmail.com wrote:
>
> vi is far too unrestricted (and also generally big and complex) to be
> securely used by root to only and exactly edit one specific file
> pathname and not be allowed to do anything else.
>
> What's wrong with:
> $ vi hosts
> $ sudo /bin/cp hosts /etc/inet/hosts


Ah, sillly me - that would allow hosts to be read even in locations
where it shouldn't be readable.

How about :
$ vi hosts
$ <hosts sudo dd of=/etc/inet/hosts

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com