Projekt

Allgemein

Profil

Howto sudo » Historie » Version 1

Jeremias Keihsler, 20.10.2021 09:54

1 1 Jeremias Keihsler
h1. sudo
2
3
is an alias for @substitute user do@, it allows user to run programs with root-privileges.
4
5
h2. usage
6
7
example: run @yum update@
8
<pre><code class="shell">
9
sudo yum update
10
</code></pre>
11
example: show available commands
12
<pre><code class="shell">
13
sudo -l
14
</code></pre>
15
16
h2. config /etc/sudoers.d
17
18
make a separate file for each user
19
<pre><code class="shell">
20
visudo -f /etc/sudoers.d/zabbix
21
</code></pre>
22
<pre zabbix>
23
zabbix ALL = NOPASSWD:/usr/local/bin/get_smart_value.sh
24
</pre>
25
<pre trusted_user>
26
trusted_user ALL=/bin/bash
27
</pre>
28
29
h2. check configuration
30
31
<pre><code class="shell">
32
visudo -c
33
</code></pre>