[sudo-users] FW: less
alexandresumare at hotmail.com
Tue Aug 4 18:47:07 EDT 2009
Viele, I think that it is not a good idea. The command less allows users to escape to shell. So, it is not secure.
Try to avoid using any command that allows to escape to shell, like vi, more, less.
Using the command cat, the user has privilege to read the file as root, but he/she executes the command less as a regular userID.
> Date: Tue, 4 Aug 2009 08:22:00 +0200
> From: Hullen at t-online.de
> To: sudo-users at sudo.ws
> Subject: Re: [sudo-users] less
> Hallo, alexandre,
> Du meintest am 04.08.09:
> >> I want to let the user view log files, I know I could do it with
> >> standard file permissions but I wanted to log administrative
> >> activity using sudo.
> > You can let users to use /bin/cat to view logfiles. So, they can use:
> > sudo cat /var/log/logfile | less
> [full quote and top post repaired]
> What about
> sudo less /var/log/logfile
> "less" doesn't need "cat".
> Viele Gruesse!
> sudo-users mailing list <sudo-users at sudo.ws>
> For list information, options, or to unsubscribe, visit:
Get free photo software from Windows Live
More information about the sudo-users