D
D
Drno2020-02-12 23:02:09
linux
Drno, 2020-02-12 23:02:09

How to properly give permissions to configure the ubuntu network?

Good day.
Tell me how to correctly give the user permission to change network settings and restrict everything else?
The logic is this - a person connects via ssh, then he can change the network settings. And that 's it
Used by ubuntu server 16
Network settings are in /etc/network/interfaces

Answer the question

In order to leave comments, you need to log in

2 answer(s)
M
Mikhail Vasilyev, 2020-02-13
@vasilyevmn

Out of the box - nothing.
If only crutches in the form of some scripts to write.

H
hint000, 2020-02-13
@hint000

For example :
1. give Vasily Pupkin the rights to read and write to /etc/network/interfaces
2. write a script that restarts the network
3. give the rights to Vasily Pupkin to read and execute the script, but not to write
4. give the rights to Vasily Pupkin to read and execution for the folder in which the script is located, but not for writing to this folder
5. set the full path to the script in /etc/sudoers and the rights to execute it on behalf of Vasily Pupkin

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question