356 lines
12 KiB
HTML
356 lines
12 KiB
HTML
<!doctype html>
|
|
<html lang="de">
|
|
<meta charset="utf-8">
|
|
|
|
<title>Einführung in Linux</title>
|
|
|
|
<meta name="description" content="YALC - Yet Another Linux Course ">
|
|
<meta name="author" content="Daniel Schubert">
|
|
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
|
|
<link rel="stylesheet" href="css/reveal.css">
|
|
<link rel="stylesheet" href="css/theme/league.css" id="theme">
|
|
|
|
<link rel="icon" href="img/openlogo-nd-25.png" type="img/png">
|
|
|
|
<!-- Theme used for syntax highlighting of code -->
|
|
<link rel="stylesheet" href="lib/css/zenburn.css">
|
|
|
|
<!-- Printing and PDF exports -->
|
|
<script>
|
|
var link = document.createElement( 'link' );
|
|
link.rel = 'stylesheet';
|
|
link.type = 'text/css';
|
|
link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
|
|
document.getElementsByTagName( 'head' )[0].appendChild( link );
|
|
</script>
|
|
|
|
</head>
|
|
|
|
|
|
<body>
|
|
<div class="reveal">
|
|
<!-- Any section element inside of this container is displayed as a slide -->
|
|
<div class="slides">
|
|
|
|
<section data-transition="slide" data-background="#4d7e65" data-background-transition="zoom">
|
|
<h1>LINUX</h1>
|
|
<h3>Das universelle Betriebssystem</h3>
|
|
<p>Eine Einführung - Teil 7
|
|
<p>
|
|
<small>Deutsche Angestellten Akademie</small>
|
|
</p>
|
|
|
|
<aside class="notes">
|
|
Frage: Fragen zur letzten Stunde?
|
|
</aside>
|
|
</section>
|
|
|
|
<section data-transition="slide" data-background="lightblue" data-background-transition="zoom">
|
|
<h2 style="text-shadow: 5px 4px 15px black;">Einstieg in die Systemverwaltung</h2>
|
|
</section>
|
|
|
|
<section data-transition="slide" data-background="#4d7e65" data-background-transition="convex">
|
|
<h2>Part 0 - Zugrifssrechte </h2>
|
|
</section>
|
|
|
|
<section>
|
|
<pre><code>~$ ls -l
|
|
|
|
drwxr-xr-x 2 dany dany 4096 Nov 14 09:03 backup/
|
|
-rw-r--r-- 1 dany dany 845 Jul 24 13:45 .bash_aliases
|
|
-rw------- 1 dany dany 32726 Jan 15 15:08 .bash_history
|
|
-rw-r--r-- 1 dany dany 2410 Nov 13 12:14 .bashrc
|
|
drwxr-xr-x 2 dany dany 4096 Jan 15 16:05 Bilder/
|
|
drwxr-xr-x 6 dany dany 4096 Nov 15 15:38 bin/
|
|
</code></pre>
|
|
</section>
|
|
|
|
<section>
|
|
<pre><code>drwxr-xr-x 6 dany dany 4096 Nov 15 15:38 bin/</code></pre>
|
|
|
|
<p style="font-size: .6em">erstes Zeichen: Filetype ( hier „d“ für directory )</p>
|
|
|
|
<table style="font-size: .6em" >
|
|
<caption>
|
|
</caption>
|
|
<tbody><tr>
|
|
<th colspan="2" style="text-align: left">Three permission triads
|
|
</th></tr>
|
|
<tr>
|
|
<td style="text-align: right; vertical-align: text-top;">first triad</td>
|
|
<td>what the owner can do
|
|
</td></tr>
|
|
<tr>
|
|
<td style="text-align: right; vertical-align: text-top;">second triad</td>
|
|
<td>what the group members can do
|
|
</td></tr>
|
|
<tr>
|
|
<td style="text-align: right; vertical-align: text-top;">third triad</td>
|
|
<td>what other users can do
|
|
</td></tr>
|
|
<tr>
|
|
<th colspan="2" style="text-align: left">Each triad
|
|
</th></tr>
|
|
<tr>
|
|
<td style="text-align: right; vertical-align: text-top;">first character</td>
|
|
<td><tt>r</tt>: readable
|
|
</td></tr>
|
|
<tr>
|
|
<td style="text-align: right; vertical-align: text-top;">second character</td>
|
|
<td><tt>w</tt>: writable
|
|
</td></tr>
|
|
<tr>
|
|
<td style="text-align: right; vertical-align: text-top;">third character</td>
|
|
<td><tt>x</tt>: executable<br><tt>s</tt> or <tt>t</tt>: <a href="/wiki/Setuid" title="Setuid">setuid</a>/<a href="/wiki/Setgid" class="mw-redirect" title="Setgid">setgid</a> or <a href="/wiki/Sticky_bit" title="Sticky bit">sticky</a> (also executable)<br><tt>S</tt> or <tt>T</tt>: setuid/setgid or sticky (not executable)
|
|
</td></tr></tbody></table>
|
|
</section>
|
|
<section>
|
|
<h4>Beispiele</h4>
|
|
|
|
<pre><code> drwx------ 6 archie users 4096 Jul 5 17:37 Documents </code></pre>
|
|
<p style="font-size:.5em">
|
|
Benutzer archie darf: lesen schreiben ausführen, Inhalt auflisten
|
|
</p>
|
|
|
|
<div class="fragment">
|
|
<pre><code> dr-x------ 6 archie users 4096 Jul 5 17:37 Documents </code></pre>
|
|
<p style="font-size:.5em">
|
|
Benutzer archie darf: lesen ausführen, Inhalt auflisten
|
|
</p>
|
|
</div>
|
|
<div class="fragment">
|
|
<pre><code> d-wx------ 6 archie users 4096 Jul 5 17:37 Documents </code></pre>
|
|
<p style="font-size:.5em">
|
|
Benutzer archie darf: in das Verz. Dateien schreiben, Dateien listen/öffnen deren Namen er kennt
|
|
</p>
|
|
</div>
|
|
|
|
<div class="fragment">
|
|
<pre><code> d--x------ 6 archie users 4096 Jul 5 17:37 Documents </code></pre>
|
|
<p style="font-size:.5em">
|
|
Benutzer archie darf: Dateien listen/öffnen deren Namen er kennt
|
|
</p>
|
|
</div>
|
|
|
|
<div class="fragment">
|
|
<pre><code> -rw-r--r-- 1 archie users 5120 Jun 27 08:28 foobar </code></pre>
|
|
<p style="font-size:.5em">
|
|
Benutzer archie darf: lesen/schreiben; Alle anderen dürfen lesen
|
|
</p>
|
|
</div>
|
|
|
|
<aside class="notes">
|
|
ls -l <br>
|
|
ls -n
|
|
</aside>
|
|
|
|
</section>
|
|
|
|
<section>
|
|
<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>
|
|
<h4>Rechte ändern</h4>
|
|
<p><code>chmod</code> - ändert Zugriffsrechte
|
|
<p><code>chown</code> - ändert Datei / Verz. Besitzer
|
|
<p><code>chgrp</code> - ändert die Ben. Gruppe
|
|
<p><code>umask</code> - zeigt und setzt default Rechte
|
|
</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">
|
|
<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>
|
|
<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 data-transition="slide" data-background="#4d7e65" data-background-transition="convex">
|
|
<h2>Part 2 - Benutzerverwaltung</h2>
|
|
</section>
|
|
<section>
|
|
|
|
</section>
|
|
|
|
|
|
<section>
|
|
|
|
</section>
|
|
<section data-transition="slide" data-background="#4d7e65" data-background-transition="convex">
|
|
<h2>Part 3 - Prozessverwaltung</h2>
|
|
</section>
|
|
|
|
<section data-transition="slide" data-background="#4d7e65" data-background-transition="convex">
|
|
<h2>Part 3 - daemons</h2>
|
|
</section>
|
|
|
|
<section data-transition="slide" data-background="#4d7e65" data-background-transition="convex">
|
|
<h2>Part 4 - Uhrzeit und Datum</h2>
|
|
</section>
|
|
|
|
<section data-transition="slide" data-background="#4d7e65" data-background-transition="convex">
|
|
<h2>Part 5 - Zeitgesteuerte Jobs</h2>
|
|
</section>
|
|
|
|
<section data-transition="slide" data-background="#4d7e65" data-background-transition="convex">
|
|
<h2>Part 6 - Cron</h2>
|
|
</section>
|
|
|
|
<section data-transition="slide" data-background="#4d7e65" data-background-transition="convex">
|
|
<h2>Part 7 - Startup / Shutdown</h2>
|
|
</section>
|
|
|
|
<section>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<script src="lib/js/head.min.js"></script>
|
|
<script src="js/reveal.js"></script>
|
|
|
|
<script>
|
|
|
|
// More info https://github.com/hakimel/reveal.js#configuration
|
|
Reveal.initialize({
|
|
controls: true,
|
|
progress: true,
|
|
history: true,
|
|
center: true,
|
|
|
|
transition: 'slide', // none/fade/slide/convex/concave/zoom
|
|
|
|
// More info https://github.com/hakimel/reveal.js#dependencies
|
|
dependencies: [
|
|
{ src: 'lib/js/classList.js', condition: function() { return !document.body.classList; } },
|
|
{ src: 'plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
|
|
{ src: 'plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
|
|
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
|
|
{ src: 'plugin/search/search.js', async: true },
|
|
{ src: 'plugin/zoom-js/zoom.js', async: true },
|
|
{ src: 'plugin/notes/notes.js', async: true }
|
|
]
|
|
});
|
|
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|