<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linux für alle &#187; home</title>
	<atom:link href="http://www.simplylinux.ch/tag/home/feed" rel="self" type="application/rss+xml" />
	<link>http://www.simplylinux.ch</link>
	<description>Jeder kann Linux beherrschen lernen...</description>
	<lastBuildDate>Thu, 08 Jul 2010 08:37:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Ändern des Standard-/home Verzeichnisses</title>
		<link>http://www.simplylinux.ch/aendern-des-standard-home-verzeichnisses</link>
		<comments>http://www.simplylinux.ch/aendern-des-standard-home-verzeichnisses#comments</comments>
		<pubDate>Sat, 06 Dec 2008 19:25:28 +0000</pubDate>
		<dc:creator>hyper_ch</dc:creator>
				<category><![CDATA[CLI]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[hyper_ch]]></category>
		<category><![CDATA[change home folder]]></category>
		<category><![CDATA[home]]></category>

		<guid isPermaLink="false">http://www.simplylinux.ch/?p=31</guid>
		<description><![CDATA[Ich habe mich in letzter Zeit ein bisschen mit Raid1 / LVM / Verschlüsselung befasst. Ich habe entsprechend auch ein Howto auf howtoforge.com diesbezüglich veröffentlicht. Nun habe ich für unsere kleine Kanzlei einen neuen Server zusammengebastelt. Besten Dank noch an Chris beim Zusammenbauen &#8211; bei dir geht das viel schneller als bei mir *g*. Ziel [...]]]></description>
			<content:encoded><![CDATA[<p>Ich habe mich in letzter Zeit ein bisschen mit Raid1 / LVM / Verschlüsselung befasst. Ich habe entsprechend auch ein Howto auf <a href="http://www.howtoforge.com/set-up-a-fully-encrypted-raid1-lvm-system">howtoforge.com</a> diesbezüglich veröffentlicht.</p>
<p>Nun habe ich für unsere kleine Kanzlei einen neuen Server zusammengebastelt. Besten Dank noch an Chris beim Zusammenbauen &#8211; bei dir geht das viel schneller als bei mir *g*. Ziel auf des Servers ist folgendes Schema:<br />
<span id="more-31"></span><br />
- Alles wird mit einem Raid1 gespiegelt<br />
- Die /boot Partition ist Ext3 und unverschlüsselt (1 GB)<br />
- Swap ist verschlüsselt (2GB)<br />
- Die root &#8220;/&#8221; Partition ist auch Ext3 und verschlüsselt (15GB)<br />
- Der Rest der 1 TB Platte ist auch verschlüsselt und dann innerhalb von LUKS/dm-crypt ein LVM. Gemounted will ich das ganze als /daten haben und benutze XFS als Dateisystem</p>
<p>Die Gründe dafür sind:</p>
<p>- Sollte eine der beiden Platten den Geist aufgeben, läuft das System trotzdem noch weiter<br />
- Mit Raid1 kann einfach eine neue Platte eingehängt werden und die dann als Spiegel verwendet werden<br />
- 1 GB für /boot ist mehr als genug<br />
- 2 GB reicht für Swap (die Kiste hat auch 2 GB Ram) und in der Kanzlei sind meist 5 oder weniger Leute die darauf gleichzeitig zugreifen und zudem dient die Kiste eigentlich nur als Mail- und Hordeserver<br />
- 15 GB für root &#8220;/&#8221; ist grosszügig bemessen. Da allenfalls auch ab und wann mal eine DVD gebrannt werden könnte, sollte doch ein bisschen Platz übrig sein.<br />
- Die ganzen &#8220;Benutzerdaten&#8221; sollten alle am selben Ort sein. Das macht Backups einfacher finde ich. Also will ich das /home als /daten/home haben, dasselbe gilt für /var/www &#8211;&gt; /daten/www und auch die MySQL DB soll dort gespeichert werden. So dass im root Verzeichnis wirklich nur die &#8220;wichtigen&#8221; Systemdinge sind.</p>
<p>Das ändern des Homeverzeichnisses geht ganz einfach.</p>
<p>Zuerst die Datei /etc/default/useradd editieren:</p>
<div id="wpshdo_1" class="wp-synhighlighter-outer"><div id="wpshdt_1" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_1"></a><a id="wpshat_1" class="wp-synhighlighter-title" href="#codesyntax_1"  onClick="javascript:wpsh_toggleBlock(1)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_1" onClick="javascript:wpsh_code(1)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_1" onClick="javascript:wpsh_print(1)" title="Print code"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_1" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;"><span class="kw2">nano</span> <span class="sy0">/</span>etc<span class="sy0">/</span>default<span class="sy0">/</span>useradd</pre></div></div>
<p>Dort die &#8220;HOME&#8221; Variable finden und diese ändern zu:</p>
<div id="wpshdo_2" class="wp-synhighlighter-outer"><div id="wpshdt_2" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_2"></a><a id="wpshat_2" class="wp-synhighlighter-title" href="#codesyntax_2"  onClick="javascript:wpsh_toggleBlock(2)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_2" onClick="javascript:wpsh_code(2)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_2" onClick="javascript:wpsh_print(2)" title="Print code"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_2" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;"><span class="re2">HOME</span>=<span class="sy0">/</span>daten<span class="sy0">/</span>home</pre></div></div>
<p>Allenfalls kann dort auch die default shell geändert werden. Da ich für die weiteren Mail Benutzer keine virtuellen Konten anlege, muss ich Systemkonten anlegen. Die sollen aber keinen Shellzugriff kriegen. Deswegen die Shellvariable noch zu dem hier ändern:</p>
<div id="wpshdo_3" class="wp-synhighlighter-outer"><div id="wpshdt_3" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_3"></a><a id="wpshat_3" class="wp-synhighlighter-title" href="#codesyntax_3"  onClick="javascript:wpsh_toggleBlock(3)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_3" onClick="javascript:wpsh_code(3)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_3" onClick="javascript:wpsh_print(3)" title="Print code"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_3" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;"><span class="re2">SHELL</span>=<span class="sy0">/</span>bin<span class="sy0">/</span><span class="kw2">false</span></pre></div></div>
<p>Nano kann dann mit ctrl-x, &#8216;y&#8217;, enter verlassen werden.</p>
<p>Jetzt haben wir zwar das Homeverzeichnis geändert, aber wir müssen auch die bestehenden Benutzer übertragen:</p>
<div id="wpshdo_4" class="wp-synhighlighter-outer"><div id="wpshdt_4" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_4"></a><a id="wpshat_4" class="wp-synhighlighter-title" href="#codesyntax_4"  onClick="javascript:wpsh_toggleBlock(4)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_4" onClick="javascript:wpsh_code(4)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_4" onClick="javascript:wpsh_print(4)" title="Print code"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_4" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;"><span class="kw2">mv</span> <span class="sy0">/</span>home <span class="sy0">/</span>daten<span class="sy0">/</span></pre></div></div>
<p>Und dann, nur zur Sicherheit, noch einen Symlink erstellen:</p>
<div id="wpshdo_5" class="wp-synhighlighter-outer"><div id="wpshdt_5" class="wp-synhighlighter-expanded"><table border="0" width="100%"><tr><td align="left" width="80%"><a name="#codesyntax_5"></a><a id="wpshat_5" class="wp-synhighlighter-title" href="#codesyntax_5"  onClick="javascript:wpsh_toggleBlock(5)" title="Click to show/hide code block">Code block</a></td><td align="right"><a href="#codesyntax_5" onClick="javascript:wpsh_code(5)" title="Show code only"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/code.png" /></a>&nbsp;<a href="#codesyntax_5" onClick="javascript:wpsh_print(5)" title="Print code"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/printer.png" /></a>&nbsp;<a href="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/About.html" target="_blank" title="Show plugin information"><img border="0" style="border: 0 none" src="http://www.simplylinux.ch/wp-content/plugins/wp-synhighlight/themes/default/images/info.gif" /></a>&nbsp;</td></tr></table></div><div id="wpshdi_5" class="wp-synhighlighter-inner" style="display: block;"><pre class="bash" style="font-family:monospace;"><span class="kw2">ln</span> <span class="re5">-s</span> <span class="sy0">/</span>daten<span class="sy0">/</span>home <span class="sy0">/</span>home</pre></div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.simplylinux.ch/aendern-des-standard-home-verzeichnisses/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
