Mailinglist Archive: opensuse (1264 mails)

< Previous Next >
Re: [opensuse] Re: set owner + mode on dirs below a start (was Re: Quick question: how to call a script function from "find"?)
On 2017-06-14 05:24, L A Walsh wrote:
Carlos E. R. wrote:
On 2017-06-14 02:14, L A Walsh wrote:

Carlos E. R. wrote:




My sudoers file is edited to allow only specific commands.

---
Right -- so now you only need 1 line, versus the above
method requiring at least 2 lines.

Or, you could store a script in /usr/bin, that does your
xargs call. Then you can just permit the script.

-about running a shell script with the command in it?


Allowing a script in sudo is dangerous. It can be edited to anything.

----
Really? Try this on your system:

find /usr/sbin -maxdepth 1 -type f|wc -l
739
find /usr/sbin -maxdepth 1 -type f|xargs -n1 -P10 file |grep shell|wc -l
105
----
14% of the files in /usr/sbin are scripts on my system.

Are you saying they are all "dangerous"?
The percentage in /usr/bin is higher.

Of course scripts are NOT dangerous -- if they are
owned by root and not user-writeable, they are as
secure as binaries.

But the script in question is owned by a user. And he edits it. He must.

--
Cheers / Saludos,

Carlos E. R.
(from 42.2 x86_64 "Malachite" at Telcontar)

< Previous Next >
Follow Ups