7
This commit is contained in:
parent
b0a16b3b97
commit
251685154e
132
7.html
132
7.html
@ -51,7 +51,7 @@
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section data-transition="slide" data-background="lightblue" data-background-transition="zoom">
|
<section data-transition="slide" data-background="lightblue" data-background-transition="zoom">
|
||||||
<h2>Einstieg in die Systemverwaltung</h2>
|
<h2 style="text-shadow: 5px 4px 15px black;">Einstieg in die Systemverwaltung</h2>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section data-transition="slide" data-background="#4d7e65" data-background-transition="convex">
|
<section data-transition="slide" data-background="#4d7e65" data-background-transition="convex">
|
||||||
@ -153,24 +153,124 @@ drwxr-xr-x 6 dany dany 4096 Nov 15 15:38 bin/
|
|||||||
|
|
||||||
<section>
|
<section>
|
||||||
<h4>Spezialrechte</h4>
|
<h4>Spezialrechte</h4>
|
||||||
|
<div class="fragment">
|
||||||
|
<h5>Das das s-Bit (auch Setuid/Setgid-Bit genannt)</h5>
|
||||||
|
<pre><code>~$ ls -l /usr/bin/passwd
|
||||||
|
-rwsr-xr-x 1 root root 54224 Aug 21 2017 /usr/bin/passwd*
|
||||||
|
</code></pre>
|
||||||
|
</dir>
|
||||||
|
<div class="fragment">
|
||||||
|
<h5> das t-Bit (auch Sticky-Bit genannt )</h5>
|
||||||
|
<pre><code>~$ ls -ld /tmp/
|
||||||
|
drwxrwxrwt 18 root root 114688 Jan 16 20:29 /tmp//</code></pre>
|
||||||
|
</dir>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
<h4>Rechte ändern</h4>
|
<h4>Rechte ändern</h4>
|
||||||
chmod
|
<p><code>chmod</code> - ändert Zugriffsrechte
|
||||||
chown
|
<p><code>chown</code> - ändert Datei / Verz. Besitzer
|
||||||
chgrp
|
<p><code>chgrp</code> - ändert die Ben. Gruppe
|
||||||
|
<p><code>umask</code> - zeigt und setzt default Rechte
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<h4>chmod</h4>
|
||||||
|
<pre class="fragment"><code>chmod +x mein-script.sh</code></pre>
|
||||||
|
<pre class="fragment"><code>chmod a+x mein-script.sh</code></pre>
|
||||||
|
<pre class="fragment"><code>chmod u+x mein-script.sh</code></pre>
|
||||||
|
<pre class="fragment"><code>chmod ug+x mein-script.sh</code></pre>
|
||||||
|
<pre class="fragment"><code>chmod -x verzeichnis</code></pre>
|
||||||
|
<pre class="fragment"><code>chmod -r mein-script.sh</code></pre>
|
||||||
|
<pre class="fragment"><code>chmod ugo-r mein-script.sh</code></pre>
|
||||||
|
<pre class="fragment"><code>chmod a-r mein-script.sh</code></pre>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<h4>oktale Rechte-Notation</h4>
|
||||||
|
<pre class="fragment"><code>chmod +x mein-script.sh</code></pre>
|
||||||
|
<pre class="fragment"><code>chmod 755 mein-script.sh</code></pre>
|
||||||
|
<table class="fragment"><tbody><tr><td> Recht </td><td> Wert </td><td> </td><td> Recht </td><td> Wert </td></tr><tr><td> Lesen </td><td> 4 </td><td style="border: none"> </td><td> Set-UID </td><td> 4 </td></tr><tr><td> Schreiben </td><td> 2 </td><td style="border: none"> </td><td> Set-GID </td><td> 2 </td></tr><tr><td> Ausführen </td><td> 1 </td><td style="border: none"> </td><td> Sticky </td><td> 1 </td></tr></tbody></table>
|
||||||
|
<pre class="fragment"><code>chmod 4755 skript.sh</code></pre>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<h4>chown</h4>
|
||||||
|
<pre class="fragment"><code>chown mhoe mein-script.sh</code></pre>
|
||||||
|
<pre class="fragment"><code>chown mhoe users mein-script.sh</code></pre>
|
||||||
|
<pre class="fragment"><code>chown mhoe. mein-script.sh</code></pre>
|
||||||
|
<pre class="fragment"><code>chown root mein-script.sh</code></pre>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<div class="fragment">
|
||||||
|
<h4>chgrp</h4>
|
||||||
|
<pre><code>chgrp users mein-script.sh</code></pre>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="fragment">
|
||||||
|
<h4>umask</h4>
|
||||||
|
<pre><code>umask -S</code></pre>
|
||||||
|
<p style="font-size: .6em">Gibt an welche Rechte von den Standard-Rechten abgezogen werden.<br> 0666 für Dateien, 0777 für Verz.</p>
|
||||||
|
<p style="font-size: .6em">0666 - 0022 = 0644</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<aside class=notes>
|
||||||
|
nautilus öffnen - rechte ansehen
|
||||||
|
</aside>
|
||||||
|
</section>
|
||||||
|
|
||||||
<section data-transition="slide" data-background="#4d7e65" data-background-transition="convex">
|
<section data-transition="slide" data-background="#4d7e65" data-background-transition="convex">
|
||||||
<h2>Part 1 - sudo </h2>
|
<h2>Part 1 - Benutzerverwaltung </h2>
|
||||||
|
</section>
|
||||||
|
<section>
|
||||||
|
<p>Es gibt 3 Arten von Benutzern:</p>
|
||||||
|
<ul>
|
||||||
|
<li class="fragment">normale Benuzter</li>
|
||||||
|
<li class="fragment">root</li>
|
||||||
|
<li class="fragment">System-Benutzer</li>
|
||||||
|
</ul>
|
||||||
|
<div class="fragment">Systembenutzer dienen als Besitzer von Diensten; anmelden als solche nicht möglich.<br> zB meist <code>www-data</code> für apache</div>
|
||||||
</section>
|
</section>
|
||||||
|
<section>
|
||||||
|
<h4>Befehle zur Nutzerverwaltung</h4>
|
||||||
|
|
||||||
|
<table style="font-size: .7em">
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>adduser</td>
|
||||||
|
<td>fügt einen neuen Nutzer hinzu</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>adduser --system</td>
|
||||||
|
<td>fügt einen neuen System-Nutzer hinzu</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>addgroup</td>
|
||||||
|
<td>fügt eine neue System-Grupppe hinzu</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>deluser</td>
|
||||||
|
<td>löscht ein Nutzerkonto - NICHT sein home-Verz.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>usermod</td>
|
||||||
|
<td>ändert ein Nutzerkonto ( zb Gruppen, home-Verz., ... )</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- -->
|
||||||
|
<section>
|
||||||
|
<h4>Wichtige Dateien</h4>
|
||||||
|
<ul>
|
||||||
|
<li class="fragment">/etc/passwd</li>
|
||||||
|
<li class="fragment">/etc/group</li>
|
||||||
|
<li class="fragment">/etc/adduser.conf</li>
|
||||||
|
<li class="fragment">/etc/skel/*</li>
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
|
||||||
<section>
|
<section>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
@ -179,11 +279,7 @@ drwxr-xr-x 6 dany dany 4096 Nov 15 15:38 bin/
|
|||||||
<h2>Part 2 - Benutzerverwaltung</h2>
|
<h2>Part 2 - Benutzerverwaltung</h2>
|
||||||
</section>
|
</section>
|
||||||
<section>
|
<section>
|
||||||
<h4>Befehle zur Benutzerverwaltung</h4>
|
|
||||||
|
|
||||||
<ul>
|
|
||||||
<li class="fragment ">this</li>
|
|
||||||
</ul>
|
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
10
aufgabe2.html
Normal file
10
aufgabe2.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
Aufgabe: Erstellt script mit mind einer Funktion das:
|
||||||
|
- ein Backup eines Verzeichnisses erstellt
|
||||||
|
- per Parameter den namen des Quell-Verzeichnis erhält
|
||||||
|
- per Parameter den Namen der Zieldatei erhält-
|
||||||
|
- einen nützlichen exit code setzt
|
||||||
|
- vielleicht nützliche Meldungen ausgibt
|
||||||
|
- prüft
|
||||||
|
- ob das backup verz existiert
|
||||||
|
- ob die backupdatei schon existiert
|
||||||
|
|
0
beispiele/4/mysystem.sh
Normal file → Executable file
0
beispiele/4/mysystem.sh
Normal file → Executable file
0
beispiele/5/10-whiptail.sh
Executable file → Normal file
0
beispiele/5/10-whiptail.sh
Executable file → Normal file
Loading…
Reference in New Issue
Block a user