[sudo-users] HOWTO put many editors easily

Edilmar Alves - Lista edilista at fes.br
Wed Nov 17 18:36:27 EST 2004


Ladner, Eric (Eric.Ladner) escreveu:

>If the sudoers file supported full regular expressions, you could do
>something like this:
>
>Cmnd_Alias    RESOLV = /usr/bin/@(gedit|vim|vi|whatever)
>/etc/resolv.conf
>
Hi Eric,

I tried this in my sudo 1.6.7p5 but it didn't work...
[edilmar at tpd edilmar]$ sudo /usr/bin/gedit /etc/host.conf
Sorry, user edilmar is not allowed to execute '/usr/bin/gedit 
/etc/host.conf' as root on tpd.fes.br.
Then, I put the last config with gedit, vi, etc in separate and it 
worked fine.
Is the version problem?

>
>But it doesn't so you can't.
>
>In situations like this, I always take the hard ass approach and say
>"ok, you can either edit it with VI or GEDIT.  That's it."  If they
>don't know VI, they can use GEDIT.  Or maybe use VI and NANO.
>
>Eric Ladner, Systems Analyst 
>RFMS IT Support
>
>
>-----Original Message-----
>From: sudo-users-bounces at courtesan.com
>[mailto:sudo-users-bounces at courtesan.com] On Behalf Of Edilmar Alves -
>Lista
>Sent: Wednesday, November 17, 2004 3:58 PM
>To: sudo-users at sudo.ws
>Subject: [sudo-users] HOWTO put many editors easily
>
>
>If I have to allow users to edit the file /etc/resolv.conf, I do this:
>Cmnd_Alias      RESOLV = /usr/bin/gedit /etc/resolv.conf, /usr/bin/vim 
>/etc/resolv.conf
>
>Is there some way to create something like this:
>Cmnd_Alias      RESOLV = /usr/bin/gedit OR /usr/bin/vim OR ... OR ... 
>/etc/resolv.conf
>to specifically put many editors, 3 or more?
>
>____________________________________________________________ 
>sudo-users mailing list <sudo-users at sudo.ws>
>For list information, options, or to unsubscribe, visit:
>http://www.sudo.ws/mailman/listinfo/sudo-users
>
>
>
>
>  
>





More information about the sudo-users mailing list