D
D
DVoropaev2017-10-28 00:26:36
linux
DVoropaev, 2017-10-28 00:26:36

How to make it so that any user can run a certain program as root in Ubuntu?

There is a binary that lies along a constant path.
It is required that when this program is launched, it can perform actions with root rights, or rather, change file permissions. How to implement it?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Andrey Burov, 2017-10-28
@BuriK666

chown root /pat/to/bin
chmod +s /path/to/bin

https://ru.wikipedia.org/wiki/Suid

S
Sly_tom_cat ., 2017-10-28
@Sly_tom_cat

man sudoers

P
poisons, 2017-10-28
@poisons

Are you kidding me?! sudo!!! How to setup man sudo.

J
jcmvbkbc, 2017-10-28
@jcmvbkbc

If this is a binary and not a script, then besides sudo there is another option: change the owner of the file to root (chown root path/to/binary) and set the SETUID bit (chmod u+s path/to/binary).

P
Puma Thailand, 2017-10-28
@opium

run via sudo or install root suid

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question