<?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>cyborgworkshop.org &#187; Linux</title>
	<atom:link href="http://cyborgworkshop.org/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://cyborgworkshop.org</link>
	<description>Blurring the line</description>
	<lastBuildDate>Wed, 18 May 2011 13:57:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Authenticating a RHEL/Centos box against an Openfiler LDAP</title>
		<link>http://cyborgworkshop.org/2011/03/18/authenticating-a-rhelcentos-box-against-an-openfiler-ldap/</link>
		<comments>http://cyborgworkshop.org/2011/03/18/authenticating-a-rhelcentos-box-against-an-openfiler-ldap/#comments</comments>
		<pubDate>Sat, 19 Mar 2011 01:31:56 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Best Tools]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://cyborgworkshop.org/?p=716</guid>
		<description><![CDATA[I seem to be running on a theme here. Setting your centos 5 boxes to authenticate users against your Openfiler LDAP server isn&#8217;t as straight forward as setting samba up to auth against it. You&#8217;ll obviously need to have Openfiler and LDAP already setup, but you&#8217;re also going to have to do some per user [...]]]></description>
			<content:encoded><![CDATA[<p>I seem to be running on a theme here.  Setting your centos 5 boxes to authenticate users against your Openfiler LDAP server isn&#8217;t as straight forward as setting samba up to auth against it.  You&#8217;ll obviously need to have Openfiler and LDAP already setup, but you&#8217;re also going to have to do some per user modifications in LDAP and some PAM configuration changes on the Centos box.  So, starting with the easiest part.  Download and copy this script to your openfiler machine. I did not write this script (I found it <a href="https://forums.openfiler.com/viewtopic.php?pid=8604">here</a>) I just modified it for my use.</p>
<blockquote><p>
#!/bin/bash<br />
# change shell and home for user in OpenFiler LDAP server</p>
<p>BINDDN=&#8221;cn=Manager,dc=themclarks,dc=com&#8221;<br />
BASEDN=&#8221;ou=People,dc=themclarks,dc=com&#8221;</p>
<p>USER=$1<br />
SHELL=$2</p>
<p>if [ -z "${SHELL}" -o -n "${3}" ]; then<br />
echo &#8220;Usage: $0  &#8221;<br />
exit 1<br />
fi</p>
<p>ldapsearch -s base -x -b &#8220;uid=${USER},${BASEDN}&#8221; &gt; /dev/null<br />
if [ $? -ne 0 ]; then<br />
echo &#8220;Error: User ${USER} not found in LDAP server&#8221;<br />
exit 1<br />
fi</p>
<p>grep -q -E -e &#8220;^${SHELL}$&#8221; /etc/shells<br />
if [ $? -ne 0 ]; then<br />
echo &#8220;Error: ${SHELL} not found in /etc/shells&#8221;<br />
exit 1<br />
fi</p>
<p>ldapmodify -x -D ${BINDDN} -W &lt;<br />
dn: uid=${USER},${BASEDN}<br />
changetype: modify<br />
replace: homeDirectory<br />
homeDirectory: /home/${USER}<br />
EOF<br />
ldapmodify -x -D ${BINDDN} -W &lt;<br />
dn: uid=${USER},${BASEDN}<br />
changetype: modify<br />
replace: loginShell<br />
loginShell: ${SHELL}<br />
EOF
</p></blockquote>
<p>Before you run this script, go into openfiler and make a backup of your LDAP config and database.  I doubt their will be a problem, but if you don&#8217;t do a backup I can almost guarantee something bad will happen.<br />
Be sure to chmod 775 that script.  When you run it you will need to supply the user you want to modify and the shell you want them to have. Home directories will be in /home, but you can modify that as you see fit. <br />
Once that script has run, you will have a user setup with a shell and a home directory in LDAP.  moving on to the Centos box<br />
run authconfig as root and select &#8220;Use LDAP&#8221; in User Information and &#8220;Use LDAP Authentication&#8221; in Authentication.  I also like to select &#8220;Local Authentication is sufficient&#8221; so I can add an oh-crap account.  When you select next, you will be prompted for some LDAP settings.  <br />
Leave Use TLS unchecked. <br />
LDAP Server will be ldap://OPEN_FILER_SERVER_NAME<br />
Base DN: will be &#8220;dc=your_domain,dc=com&#8221;<br />
Hit OK.  you can test to see if this works by doing an<br />
<code><br />
su - $USER<br />
</code><br />
for the user that you setup in LDAP. This should work, but it will give you an error about not having a home directory. To fix that, we need to make a change to the pam config.  If you did this using the gui authconfig, I believe you will have had an option to setup the automatic creation of home directories, so if you don&#8217;t get an error, you&#8217;re done.<br />
as root on the centos box, edit /etc/pam.d/system-auth and add the following line to the bottom of the file<br />
<code><br />
session    required     pam_mkhomedir.so skel=/etc/skel umask=0022<br />
</code><br />
save the file and do an su &#8211; to the user you setup in LDAP.  You should see a message about a home directory being created. Congratulations, you are authing to LDAP!</p>
]]></content:encoded>
			<wfw:commentRss>http://cyborgworkshop.org/2011/03/18/authenticating-a-rhelcentos-box-against-an-openfiler-ldap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Authenticating a samba server against the LDAP server in Openfiler</title>
		<link>http://cyborgworkshop.org/2011/03/05/authenticating-a-samba-server-against-the-ldap-server-in-openfiler/</link>
		<comments>http://cyborgworkshop.org/2011/03/05/authenticating-a-samba-server-against-the-ldap-server-in-openfiler/#comments</comments>
		<pubDate>Sun, 06 Mar 2011 02:28:01 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Best Tools]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://cyborgworkshop.org/?p=710</guid>
		<description><![CDATA[I have an openfiler based NAS running as my main file server and an ubuntu VM running rsync that backs that server up. I wanted to be able to browse my backups via samba, and for giggles, authenticate that samba server against the openfiler LDAP that is already configured. This turned out to be really [...]]]></description>
			<content:encoded><![CDATA[<p>I have an openfiler based NAS running as my main file server and an ubuntu VM running rsync that backs that server up. I wanted to be able to browse my backups via samba, and for giggles, authenticate that samba server against the openfiler LDAP that is already configured. This turned out to be really easy.   First install samba.<br />
<code><br />
sudo apt-get install samba<br />
</code><br />
In the new /etc/samba/smb.conf,  you need to replace the passdb backend statement with<br />
<code><br />
passdb backend ldapsam:ldap://$DNS_NAME_OF_OPENFILE<br />
</code><br />
and add the following lines<br />
<code><br />
ldap ssl = no<br />
ldap admin dn = cn=Manager,dc=$YOURDOMAIN,dc=com<br />
ldap suffix = dc=$YOURDOMAIN,dc=com<br />
ldap user suffix = ou=People<br />
ldap group suffix = ou=Group<br />
</code><br />
Be sure to replace $YOURDOMAIN with the domain you configured when you first setup LDAP in openfiler.<br />
The last step is to store LDAP auth credentials in the secrets.tdb file so samba can query your LDAP. you do that by running<br />
<code><br />
smbpasswd -w $OPENFILER_LDAP_PASSWORD<br />
</code><br />
and replace $OPENFILER_LDAP_PASSWORD with the LDAP password you configured when you created the openfiler LDAP.  restart samba with<br />
<code><br />
service smbd restart<br />
</code><br />
And you should now be authenticating to you openfiler LDAP!</p>
]]></content:encoded>
			<wfw:commentRss>http://cyborgworkshop.org/2011/03/05/authenticating-a-samba-server-against-the-ldap-server-in-openfiler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting RO networks to work in openfiler 2.3 Final 64 bit</title>
		<link>http://cyborgworkshop.org/2011/01/09/getting-ro-networks-to-work-in-openfiler-2-3-final-64-bit/</link>
		<comments>http://cyborgworkshop.org/2011/01/09/getting-ro-networks-to-work-in-openfiler-2-3-final-64-bit/#comments</comments>
		<pubDate>Sun, 09 Jan 2011 18:45:59 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://cyborgworkshop.org/?p=682</guid>
		<description><![CDATA[I&#8217;m not going to say that this is a really embarrassing bug, but a whole bunch of other people will. If you are using openfiler 2.3 64 bit and select a network&#8217;s access to a share to be read only, samba will panic and create a core every time you try to access that share. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not going to say that this is a really embarrassing bug, but a whole bunch of other people will.   If you are using openfiler 2.3 64 bit and select a network&#8217;s access to a share to be read only, samba will panic and create a core every time you try to access that share.   The bug does appear to be upstream, not openfiler specific, but damn man!  The fix is to revert back to an older version of samba and stay there.  To revert back, ssh into your openfiler and run the following.<br />
<code><br />
conary update samba=3.2.6-0.0.1-1<br />
conary update samba-client=3.2.6-0.0.1-1<br />
conary update samba-server=3.2.6-0.0.1-1<br />
/etc/init.d/smb restart<br />
</code><br />
That should take care of it. </p>
]]></content:encoded>
			<wfw:commentRss>http://cyborgworkshop.org/2011/01/09/getting-ro-networks-to-work-in-openfiler-2-3-final-64-bit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rip an DVD down to MPEG2 using mplayer</title>
		<link>http://cyborgworkshop.org/2010/05/19/rip-an-dvd-down-to-mpeg2-using-mplayer/</link>
		<comments>http://cyborgworkshop.org/2010/05/19/rip-an-dvd-down-to-mpeg2-using-mplayer/#comments</comments>
		<pubDate>Wed, 19 May 2010 14:40:05 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Best Tools]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://cyborgworkshop.org/?p=622</guid>
		<description><![CDATA[I back up my DVDs. I rip them to H264 using handbrake and then store the originals in a DVD holder and hopefully never have to touch, or scratch, them again. But I occasionaly run into a DVD that I can play, but I can&#8217;t copy. Shoot Em Up is a good example. So here [...]]]></description>
			<content:encoded><![CDATA[<p>I back up my DVDs. I rip them to H264 using handbrake and then store the originals in a DVD holder and hopefully never have to touch, or scratch, them again. But I occasionaly run into a DVD that I can play, but I can&#8217;t copy. Shoot Em Up is a good example.  So here is how to dump the stream to an mpeg that can then be used in handbrake with mplayer.<br />
<code><br />
mplayer -dumpstream -dumpfile test.mpg -chapter 1-17 dvd://1<br />
</code><br />
Should be pretty obvious, but chapter is the title chapters and dvd://1 is your dvd drive title number 1. </p>
]]></content:encoded>
			<wfw:commentRss>http://cyborgworkshop.org/2010/05/19/rip-an-dvd-down-to-mpeg2-using-mplayer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Linux iproute2 tools</title>
		<link>http://cyborgworkshop.org/2009/09/16/linux-iproute2-tools/</link>
		<comments>http://cyborgworkshop.org/2009/09/16/linux-iproute2-tools/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 20:20:26 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://cyborgworkshop.org/?p=539</guid>
		<description><![CDATA[The iproute2 tools are default installed on most major linux distributions now, but few people know how to use them. Once you are familiar with them though, you will lament having to use ifconfig and route. Here is a quick chart on iproute2 replacement commands.]]></description>
			<content:encoded><![CDATA[<p>The iproute2 tools are default installed on most major linux distributions now, but few people know how to use them.  Once you are familiar with them though, you will lament having to use ifconfig and route.  Here is a quick chart on iproute2 replacement commands.<br />

<table id="wp-table-reloaded-id-1-no-1" class="wp-table-reloaded wp-table-reloaded-id-1">
<thead>
	<tr class="row-1 odd">
		<th class="column-1">Ifconfig Command</th><th class="column-2">IP Command</th>
	</tr>
</thead>
<tbody>
	<tr class="row-2 even">
		<td class="column-1">ifconfig -a</td><td class="column-2">ip addr show</td>
	</tr>
	<tr class="row-3 odd">
		<td class="column-1">ifconfig eth0 1.2.3.4 netmask 255.255.255.255</td><td class="column-2">ip addr add 1.2.3.4 255.255.255.255 dev eth0</td>
	</tr>
	<tr class="row-4 even">
		<td class="column-1">netstat -nvr</td><td class="column-2">ip route</td>
	</tr>
	<tr class="row-5 odd">
		<td class="column-1">route get 1.2.3.4 (solaris)</td><td class="column-2">ip route get 1.2.3.4</td>
	</tr>
	<tr class="row-6 even">
		<td class="column-1">route add -net 1.2.3.0 netmask 255.255.255.0 dev eth0</td><td class="column-2">ip route add 1.2.3.0/255.255.255.0 dev eth1</td>
	</tr>
	<tr class="row-7 odd">
		<td class="column-1">ifconfig eth0 mtu 1496</td><td class="column-2">ip link set eth0 mtu 1496</td>
	</tr>
	<tr class="row-8 even">
		<td class="column-1">ifconfig eth0 down</td><td class="column-2">ip link set eth0 down</td>
	</tr>
	<tr class="row-9 odd">
		<td class="column-1">ifconfig eth0 promisc</td><td class="column-2">ip link set eth0 promisc on</td>
	</tr>
</tbody>
</table>
</p>
]]></content:encoded>
			<wfw:commentRss>http://cyborgworkshop.org/2009/09/16/linux-iproute2-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

