<?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>AGIX Linux</title>
	<atom:link href="http://agix.com.au/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://agix.com.au/blog</link>
	<description>Linux HowTo&#039;s and Tutorials</description>
	<lastBuildDate>Thu, 17 May 2012 06:02:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Install OpenKM and Jboss (JRE) on CentOS</title>
		<link>http://agix.com.au/blog/?p=2887</link>
		<comments>http://agix.com.au/blog/?p=2887#comments</comments>
		<pubDate>Thu, 10 May 2012 03:30:12 +0000</pubDate>
		<dc:creator>Andrew Galdes</dc:creator>
				<category><![CDATA[All Linux HowTo's]]></category>

		<guid isPermaLink="false">http://agix.com.au/blog/?p=2887</guid>
		<description><![CDATA[This Howto demonstrates how to install OpenKM 5.1.9 with JRE (Jboss) on CentOS. First download JRE from the following website: http://www.oracle.com/technetwork/java/javase/downloads/jre-7u4-download-1591157.html Install JRE using the following command: yum install jre-7u4-linux-x64.rpm Next, download OpenKM using the following command: wget http://downloads.sourceforge.net/project/openkm/5.1/OpenKM-5.1.9_JBoss-4.2.3.GA.zip?r=http%3A%2F%2Fwww.openkm.com%2Fformulario%2Fdownload.php%3Faction%3DOnly%2520download&#038;ts=1336620287&#038;use_mirror=internode Extract the application to &#8220;/var/www/html/OpenKM&#8221; as follows: unzip ./OpenKM-5.1.9_JBoss-4.2.3.GA.zip mv jboss-4.2.3.GA /var/www/html/OpenKM Now you need to start OpenKM (manually): nohup /var/www/html/OpenKM/bin/run.sh -b 0.0.0.0 &#038; Or on system boot, add this to the file &#8220;/etc/rc.local&#8221;: nohup /var/www/html/OpenKM/bin/run.sh -b 0.0.0.0 &#038; Visit the website as using the following URL where the web servers IP address is &#8220;192.168.1.2&#8243;: http://192.168.1.2:8080/OpenKM TIP: the username is &#8220;okmAdmin&#8221; and password &#8220;admin&#8221;. At this point you will have a working OpenKM system. Use the following command to shutdown the OpenKM system: /var/www/html/OpenKM/bin/shutdown.sh -S The following steps will help for document previews within OpenKM: yum install ImageMagic* yum install gcc* automake zlib-devel libjpeg-devel giflib-devel freetype-devel Install SWFtools: wget http://www.swftools.org/swftools-0.9.1.tar.gz cd swftools-0.9.1 ./configure make make install Remove all cache files (may be needed if things don&#8217;t work as expected): rm -rf /var/www/html/OpemKM/cache/* In the admin section of OpenKM (Administration &#8211; Configuration), set the following: system.ghostscript.ps2pdf String /usr/bin/ps2pdf system.imagemagick.convert String /usr/bin/convert system.openoffice.path String /usr/lib64/openoffice.org3 system.openoffice.port Integer 2002 system.openoffice.tasks Integer 5 system.swftools.pdf2swf String [...]]]></description>
			<content:encoded><![CDATA[<p>This Howto demonstrates how to install OpenKM 5.1.9 with JRE (Jboss) on CentOS. First download JRE from the following website:</p>
<pre>

http://www.oracle.com/technetwork/java/javase/downloads/jre-7u4-download-1591157.html
</pre>
<p>Install JRE using the following command:</p>
<pre>
yum install jre-7u4-linux-x64.rpm
</pre>
<p>Next, download OpenKM using the following command:</p>
<pre>
wget http://downloads.sourceforge.net/project/openkm/5.1/OpenKM-5.1.9_JBoss-4.2.3.GA.zip?r=http%3A%2F%2Fwww.openkm.com%2Fformulario%2Fdownload.php%3Faction%3DOnly%2520download&#038;ts=1336620287&#038;use_mirror=internode
</pre>
<p>Extract the application to &#8220;/var/www/html/OpenKM&#8221; as follows:</p>
<pre>
unzip ./OpenKM-5.1.9_JBoss-4.2.3.GA.zip
mv jboss-4.2.3.GA /var/www/html/OpenKM
</pre>
<p>Now you need to start OpenKM (manually):</p>
<pre>
nohup /var/www/html/OpenKM/bin/run.sh -b 0.0.0.0 &#038;
</pre>
<p>Or on system boot, add this to the file &#8220;/etc/rc.local&#8221;:</p>
<pre>
nohup /var/www/html/OpenKM/bin/run.sh -b 0.0.0.0 &#038;
</pre>
<p>Visit the website as using the following URL where the web servers IP address is &#8220;192.168.1.2&#8243;:</p>
<pre>

http://192.168.1.2:8080/OpenKM
</pre>
<p>TIP: the username is &#8220;okmAdmin&#8221; and password &#8220;admin&#8221;.</p>
<p>At this point you will have a working OpenKM system. </p>
<p>Use the following command to shutdown the OpenKM system:</p>
<pre>
/var/www/html/OpenKM/bin/shutdown.sh -S
</pre>
<p>The following steps will help for document previews within OpenKM:</p>
<pre>
yum install ImageMagic*
yum install gcc* automake zlib-devel libjpeg-devel giflib-devel freetype-devel
</pre>
<p>Install SWFtools:</p>
<pre>
wget http://www.swftools.org/swftools-0.9.1.tar.gz
cd swftools-0.9.1
./configure
make
make install
</pre>
<p>Remove all cache files (may be needed if things don&#8217;t work as expected):</p>
<pre>
rm -rf /var/www/html/OpemKM/cache/*
</pre>
<p>In the admin section of OpenKM (Administration &#8211; Configuration), set the following:</p>
<pre>
system.ghostscript.ps2pdf	String	 /usr/bin/ps2pdf
system.imagemagick.convert	String	 /usr/bin/convert
system.openoffice.path	String	 /usr/lib64/openoffice.org3
system.openoffice.port	Integer	 2002
system.openoffice.tasks	Integer	 5
system.swftools.pdf2swf	String	 /usr/local/bin/pdf2swf ${fileIn} ${fileOut}
</pre>
<p>Having installed the extras, you should restart OpenKM.</p>
]]></content:encoded>
			<wfw:commentRss>http://agix.com.au/blog/?feed=rss2&#038;p=2887</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RHEL/CentOS: Save space and remove Yum cache files</title>
		<link>http://agix.com.au/blog/?p=2884</link>
		<comments>http://agix.com.au/blog/?p=2884#comments</comments>
		<pubDate>Wed, 09 May 2012 03:04:35 +0000</pubDate>
		<dc:creator>Andrew Galdes</dc:creator>
				<category><![CDATA[All Linux HowTo's]]></category>

		<guid isPermaLink="false">http://agix.com.au/blog/?p=2884</guid>
		<description><![CDATA[You can sae space on a Redhat or CentOS server by removing the cache dies from &#8220;/var/cache&#8221;. The proper way to do this is with the following command: yum clean all The &#8220;yum clean&#8221; command has other options but the &#8220;all&#8221; option will be most liberal.]]></description>
			<content:encoded><![CDATA[<p>You can sae space on a Redhat or CentOS server by removing the cache dies from &#8220;/var/cache&#8221;. The proper way to do this is with the following command:</p>
<pre>
yum clean all
</pre>
<p>The &#8220;yum clean&#8221; command has other options but the &#8220;all&#8221; option will be most liberal. </p>
]]></content:encoded>
			<wfw:commentRss>http://agix.com.au/blog/?feed=rss2&#038;p=2884</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Squid Proxy With AntiVirus (ClamAV)</title>
		<link>http://agix.com.au/blog/?p=2872</link>
		<comments>http://agix.com.au/blog/?p=2872#comments</comments>
		<pubDate>Sun, 06 May 2012 08:24:53 +0000</pubDate>
		<dc:creator>Andrew Galdes</dc:creator>
				<category><![CDATA[All Linux HowTo's]]></category>
		<category><![CDATA[Security HowTo's]]></category>

		<guid isPermaLink="false">http://agix.com.au/blog/?p=2872</guid>
		<description><![CDATA[This HowTo explains the process of adding antivirus support to Squid. The process involves the use of ICAP. ICAP is a means to extend the functionality of Squid (and other things) with the use of third party applications. An ICAP client (Squid in this case) sends information through to the ICAP server (SquidClamAV in this case) where it&#8217;s processed. The ICAP server returns information back to ICAP. In this HowTo, both Squid and SquidClamAV are on the same server. You should first install Squid to suite your needs. Read this HowTo for help with Squid configuration and installation. Squid Version 3.1.10 and CentOS 6.2 were used for this HowTo. First add the following to the file &#8220;/etc/squid/squid.conf&#8221;: icap_enable on icap_send_client_ip on icap_send_client_username on icap_client_username_header X-Authenticated-User icap_service service_req reqmod_precache bypass=1 icap://127.0.0.1:1344/squidclamav adaptation_access service_req allow all icap_service service_resp respmod_precache bypass=1 icap://127.0.0.1:1344/squidclamav adaptation_access service_resp allow all Install ClamAV using this article. Install ICAP. Download it from here. Follow these instructions (we used version 0.1.7): tar zxvf c_icap-0.1.7.tar.gz cd c_icap-0.1.7 ./configure make make install Edit the file &#8220;/usr/local/etc/c-icap.conf&#8221; to look like the following. Make sure to customise it to your situation: ServerAdmin support@agix.in ServerName agix-icap PidFile /var/run/c-icap/c-icap.pid CommandsSocket /var/run/c-icap/c-icap.ctl Timeout 300 MaxKeepAliveRequests 100 KeepAliveTimeout [...]]]></description>
			<content:encoded><![CDATA[<p>This HowTo explains the process of adding antivirus support to Squid. The process involves the use of ICAP. ICAP is a means to extend the functionality of Squid (and other things) with the use of third party applications. An ICAP client (Squid in this case) sends information through to the ICAP server (SquidClamAV in this case) where it&#8217;s processed. The ICAP server returns information back to ICAP. In this HowTo, both Squid and SquidClamAV are on the same server. </p>
<p>You should first install Squid to suite your needs. <a href="http://agix.com.au/blog/?p=2589">Read this HowTo for help with Squid configuration and installation. </a></p>
<p>Squid Version 3.1.10 and CentOS 6.2 were used for this HowTo. </p>
<p>First add the following to the file &#8220;/etc/squid/squid.conf&#8221;:</p>
<pre>
icap_enable on
icap_send_client_ip on
icap_send_client_username on
icap_client_username_header X-Authenticated-User
icap_service service_req reqmod_precache bypass=1 icap://127.0.0.1:1344/squidclamav
adaptation_access service_req allow all
icap_service service_resp respmod_precache bypass=1 icap://127.0.0.1:1344/squidclamav
adaptation_access service_resp allow all
</pre>
<p>Install ClamAV <a href="http://agix.com.au/blog/?p=877">using this article</a>. </p>
<p>Install ICAP. Download it <a href="http://sourceforge.net/projects/c-icap/">from here</a>. Follow these instructions (we used version 0.1.7):</p>
<pre>
tar zxvf c_icap-0.1.7.tar.gz
cd c_icap-0.1.7
./configure
make
make install
</pre>
<p>Edit the file &#8220;/usr/local/etc/c-icap.conf&#8221; to look like the following. Make sure to customise it to your situation:</p>
<pre>
ServerAdmin support@agix.in
ServerName agix-icap

PidFile /var/run/c-icap/c-icap.pid
CommandsSocket /var/run/c-icap/c-icap.ctl
Timeout 300
MaxKeepAliveRequests 100
KeepAliveTimeout 600
StartServers 3
MaxServers 10
MinSpareThreads     10
MaxSpareThreads     20
ThreadsPerChild     10
MaxRequestsPerChild  0
Port 1344
TmpDir /var/tmp
MaxMemObject 131072
DebugLevel 1
ModulesDir /usr/local/lib/c_icap
ServicesDir /usr/local/lib/c_icap
TemplateDir /usr/local/share/c_icap/templates/
TemplateDefaultLanguage en
LoadMagicFile /usr/local/etc/c-icap.magic
RemoteProxyUsers off
RemoteProxyUserHeader X-Authenticated-User
RemoteProxyUserHeaderEncoded on
ServerLog /usr/local/var/log/server.log
AccessLog /usr/local/var/log/access.log
Service echo srv_echo.so
Service squidclamav squidclamav.so
</pre>
<p>Edit the file &#8220;/etc/rc.local&#8221; and add this above any &#8220;exit&#8221; statement you see there:</p>
<pre>
# Start C-ICAP
nohup /usr/local/bin/c-icap &#038;
</pre>
<p>Install SquidClamAV. <a href="http://sourceforge.net/projects/squidclamav/files/squidclamav/">Download it from here</a>. Install SquidClamAV as follows:</p>
<pre>
tar -xzf squidclamav-6.5.tar.gz
cd squidclamav-6.5
./configure
make
make install
</pre>
<p>Edit the file &#8221; /etc/squidclamav.conf&#8221; to look like the following. Customise it to suite your situation:</p>
<pre>
maxsize 5000000
redirect http://www.agix.in/virus.php
clamd_local /tmp/clamd.socket
timeout 1
logredir 0
dnslookup 1
</pre>
<p>Consider a system reboot at this point. Of you can restart squid and execute &#8220;/etc/rc.local&#8221; manually.</p>
<p>At this point you should have a working Squid with antivirus. For troubleshooting, consider the following:</p>
<p>Monitor related packets:</p>
<pre>
tcpdump port 1344
</pre>
<p>Monitor related logs:</p>
<pre>
tail -f /usr/local/var/log/*
</pre>
]]></content:encoded>
			<wfw:commentRss>http://agix.com.au/blog/?feed=rss2&#038;p=2872</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix Winbind Slow To Update AD Changes</title>
		<link>http://agix.com.au/blog/?p=2861</link>
		<comments>http://agix.com.au/blog/?p=2861#comments</comments>
		<pubDate>Tue, 01 May 2012 23:24:23 +0000</pubDate>
		<dc:creator>Andrew Galdes</dc:creator>
				<category><![CDATA[All Linux HowTo's]]></category>

		<guid isPermaLink="false">http://agix.com.au/blog/?p=2861</guid>
		<description><![CDATA[Using &#8220;getent&#8221; with Winbind, you can get extended user information from Active Directory. For example, without Winbind, getent will return user information from &#8220;/etc/passwd&#8221; only (well, by default). You can see this by checking your &#8220;/etc/nsswitch.conf&#8221; file. For some background information, here is an extract of the /etc/nsswitch.conf file that doesn&#8217;t use Winbind: passwd: files shadow: files group: files And here is one configured to use Winbind: passwd: files winbind shadow: files group: files win bind The above means &#8220;for users and groups, check both the /etc/passwd file and the windows domain controller&#8221;. The problem is (as this article is titled) it can take a long time (a few minutes) for Active Directory changed to get through to Winbind and for you to see them take effect in your scripts and user logins. By adding the following lines to the &#8220;[general]&#8221; section of your &#8220;/etc/samba/smb.conf&#8221; file, you can lower the delay between AD changes and getent and winbind: idmap cache time = 1 idmap negative cache time = 1 winbind cache time = 1 For example: [global] realm = AGIX.LOCAL workgroup = AGIX netbios name = flow password server = 192.168.0.199 log level = 2 security = domain preferred master [...]]]></description>
			<content:encoded><![CDATA[<p>Using &#8220;getent&#8221; with Winbind, you can get extended user information from Active Directory. For example, without Winbind, getent will return user information from &#8220;/etc/passwd&#8221; only (well, by default). You can see this by checking your &#8220;/etc/nsswitch.conf&#8221; file.</p>
<p>For some background information, here is an extract of the /etc/nsswitch.conf file that doesn&#8217;t use Winbind:</p>
<pre>passwd:     files
shadow:     files
group:      files</pre>
<p>And here is one configured to use Winbind:</p>
<pre>passwd:     files winbind
shadow:     files
group:      files win bind</pre>
<p>The above means &#8220;for users and groups, check both the /etc/passwd file and the windows domain controller&#8221;.</p>
<p>The problem is (as this article is titled) it can take a long time (a few minutes) for Active Directory changed to get through to Winbind and for you to see them take effect in your scripts and user logins. By adding the following lines to the &#8220;[general]&#8221; section of your &#8220;/etc/samba/smb.conf&#8221; file, you can lower the delay between AD changes and getent and winbind:</p>
<pre>        idmap cache time = 1
        idmap negative cache time = 1
        winbind cache time = 1</pre>
<p>For example:</p>
<pre>[global]
        realm = AGIX.LOCAL
        workgroup = AGIX
        netbios name = flow
        password server = 192.168.0.199
        log level = 2
        security = domain
        preferred master = no
        winbind separator = +
        idmap uid = 10000-20000
        idmap gid = 10000-20000
        winbind use default domain = yes
        winbind enum users = yes
        winbind enum groups = yes
        winbind uid = 10000-20000
        winbind gid = 10000-20000
        os level = 10
        idmap cache time = 1
        idmap negative cache time = 1
        winbind cache time = 1</pre>
<p>For more information about Samba and Winbind, <a href="http://agix.com.au/blog/?s=winbind">click here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://agix.com.au/blog/?feed=rss2&#038;p=2861</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How To Remove All Email From a Postfix Queue</title>
		<link>http://agix.com.au/blog/?p=2859</link>
		<comments>http://agix.com.au/blog/?p=2859#comments</comments>
		<pubDate>Tue, 01 May 2012 23:13:33 +0000</pubDate>
		<dc:creator>Andrew Galdes</dc:creator>
				<category><![CDATA[All Linux HowTo's]]></category>

		<guid isPermaLink="false">http://agix.com.au/blog/?p=2859</guid>
		<description><![CDATA[Running the following command will remove all email stuck (or simply in) your Postfix mail queue. postsuper -d ALL You&#8217;ll see something like the following: postsuper: Deleted: 613 messages Where i&#8217;ve just removed 613 emails from the Postfix queue.]]></description>
			<content:encoded><![CDATA[<p>Running the following command will remove all email stuck (or simply in) your Postfix mail queue. </p>
<pre>
postsuper -d ALL
</pre>
<p>You&#8217;ll see something like the following:</p>
<pre>
postsuper: Deleted: 613 messages
</pre>
<p>Where i&#8217;ve just removed 613 emails from the Postfix queue. </p>
]]></content:encoded>
			<wfw:commentRss>http://agix.com.au/blog/?feed=rss2&#038;p=2859</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install OpenLDAP on Redhat/CentOS</title>
		<link>http://agix.com.au/blog/?p=2851</link>
		<comments>http://agix.com.au/blog/?p=2851#comments</comments>
		<pubDate>Tue, 17 Apr 2012 10:18:50 +0000</pubDate>
		<dc:creator>Andrew Galdes</dc:creator>
				<category><![CDATA[All Linux HowTo's]]></category>

		<guid isPermaLink="false">http://agix.com.au/blog/?p=2851</guid>
		<description><![CDATA[This HowTo explains how to install an LDAP server on a Redhat server and use if as a source of authentication and perhaps contacts. Install the LDAP server: yum install -y openldap openldap-clients openldap-servers Start the LDAP server and have it start on system boot: service slapd restart chkconfig slapd on Next install the schemas: ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/cosine.ldif ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/inetorgperson.ldif ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/nis.ldif Add the following to a new file called “/tmp/back.ldif”: dn: cn=module,cn=config objectClass: olcModuleList cn: module olcModulepath: /usr/lib/ldap olcModuleload: back_hdb dn: olcDatabase=hdb,cn=config objectClass: olcDatabaseConfig objectClass: olcHdbConfig olcDatabase: {1}hdb olcSuffix: dc=agix,dc=in olcDbDirectory: /var/lib/ldap olcRootDN: cn=admin,dc=agix,dc=in olcRootPW: secret olcDbConfig: set_cachesize 0 2097152 0 olcDbConfig: set_lk_max_objects 1500 olcDbConfig: set_lk_max_locks 1500 olcDbConfig: set_lk_max_lockers 1500 olcDbIndex: objectClass eq olcLastMod: TRUE olcDbCheckpoint: 512 30 olcAccess: to attrs=userPassword by dn="cn=admin,dc=agix,dc=in" write by anonymous auth by self write by * none olcAccess: to attrs=shadowLastChange by self write by * read olcAccess: to dn.base="" by * read olcAccess: to * by dn="cn=admin,dc=agix,dc=in" write by * read And run the command: ldapadd -Y EXTERNAL -H ldapi:/// -f /tmp/back.ldif Add the following to a file called “/tmp/front.ldif”: # Create top-level object in domain dn: dc=agix,dc=in objectClass: [...]]]></description>
			<content:encoded><![CDATA[<p>This HowTo explains how to install an LDAP server on a Redhat server and use if as a source of authentication and perhaps contacts. </p>
<p>Install the LDAP server:</p>
<pre>
yum install -y openldap openldap-clients openldap-servers
</pre>
<p>Start the LDAP server and have it start on system boot:</p>
<pre>
service slapd restart
chkconfig slapd on
</pre>
<p>Next install the schemas:</p>
<pre>
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/cosine.ldif
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/inetorgperson.ldif
ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/openldap/schema/nis.ldif
</pre>
<p>Add the following to a new file called “/tmp/back.ldif”:</p>
<pre>
dn: cn=module,cn=config
objectClass: olcModuleList
cn: module
olcModulepath: /usr/lib/ldap
olcModuleload: back_hdb

dn: olcDatabase=hdb,cn=config
objectClass: olcDatabaseConfig
objectClass: olcHdbConfig
olcDatabase: {1}hdb
olcSuffix: dc=agix,dc=in
olcDbDirectory: /var/lib/ldap
olcRootDN: cn=admin,dc=agix,dc=in
olcRootPW: secret
olcDbConfig: set_cachesize 0 2097152 0
olcDbConfig: set_lk_max_objects 1500
olcDbConfig: set_lk_max_locks 1500
olcDbConfig: set_lk_max_lockers 1500
olcDbIndex: objectClass eq
olcLastMod: TRUE
olcDbCheckpoint: 512 30
olcAccess: to attrs=userPassword by dn="cn=admin,dc=agix,dc=in" write by anonymous auth by self write by * none
olcAccess: to attrs=shadowLastChange by self write by * read
olcAccess: to dn.base="" by * read
olcAccess: to * by dn="cn=admin,dc=agix,dc=in" write by * read
</pre>
<p>And run the command:</p>
<pre>
ldapadd -Y EXTERNAL -H ldapi:/// -f /tmp/back.ldif
</pre>
<p>Add the following to a file called “/tmp/front.ldif”:</p>
<pre>
# Create top-level object in domain
dn: dc=agix,dc=in
objectClass: top
objectClass: dcObject
objectclass: organization
o: AGIX Organization
dc: agix
description: AGIX LDAP

# Admin user.
dn: cn=admin,dc=agix,dc=in
objectClass: simpleSecurityObject
objectClass: organizationalRole
cn: admin
description: LDAP administrator
userPassword: secret

dn: ou=people,dc=agix,dc=in
objectClass: organizationalUnit
ou: people

dn: ou=groups,dc=agix,dc=in
objectClass: organizationalUnit
ou: groups

dn: uid=john,ou=people,dc=agix,dc=in
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
uid: john
sn: Doe
givenName: John
cn: John Doe
displayName: John Doe
uidNumber: 1000
gidNumber: 10000
userPassword: password
gecos: John Doe
loginShell: /bin/bash
homeDirectory: /home/john
shadowExpire: -1
shadowFlag: 0
shadowWarning: 7
shadowMin: 8
shadowMax: 999999
shadowLastChange: 10877
mail: john.doe@agix.in
postalCode: 31000
l: Toulouse
o: agix
mobile: +33 (0)6 xx xx xx xx
homePhone: +33 (0)5 xx xx xx xx
title: System Administrator
postalAddress:
initials: JD

dn: cn=MyGroup,ou=groups,dc=agix,dc=in
objectClass: posixGroup
cn: mygroup
gidNumber: 10000
</pre>
<p>And run the command:</p>
<pre>
ldapadd -x -D cn=admin,dc=agix,dc=in -W -f /tmp/front.ldif
</pre>
<p>Confirm your configuration by running the command. Tip, your password is “secret”:</p>
<pre>
ldapsearch -xLLL -b "dc=agix,dc=in" uid=john sn givenName cn
</pre>
<p>Now you should have a confirmed working LDAP. Consider installing Webmin and the LDAP modules to allow you to easily interface with your new LDAP. The two modules to install are “LDAP Server” and “LDAP Users and Groups”. The LDAP Server tool allows you to browse and modify your LDAP database. The LDAP Users and Groups module allows you to administer user accounts stored in LDAP.</p>
<p>Install Webmin (not documented here) Once you can log into Webmin:</p>
<p>1. go to Webmiun<br />
2. Webmin Configuration<br />
3. Webmin modules<br />
4. Tick “Standard module from www.webmin.com” and click the browse button<br />
5. Select “LDAP Server” and then click Install Module.</p>
<p>Do the same for LDAP Users and Groups.</p>
<p>Now you need to configure the modules.</p>
<p>1. In Webmin, click on Servers<br />
2. Click on LDAP Users and Groups<br />
3. Click on Module Config<br />
4. LDAP Server host = localhost<br />
5. Bind to LDAP server as = cn=admin,dc=agix,dc=in<br />
6. Base for users = ou=people,dc=agix,dc=in<br />
7. Base for groups = ou=groups,dc=agix,dc=in<br />
8. Other objectClasses to add to new users = inetOrgPerson<br />
9. Click Save</p>
<p>Now locate LDAP Server and go through the following:</p>
<p>1. LDAP server hostname = localhost<br />
2. Login for LDAP server = cn=admin,dc=agix,dc=in<br />
3. Password for LDAP server = secret<br />
4. Click Save</p>
<p>You should now be able to create user accounts using the “LDAP Users and Groups” module and create contacts (like a phone directory) using “LDAP Server”. However, until you configure PAM and NSS, you wont be able to log into the local system using your LDAP users. Although you can authenticate against your LDAP for other systems. For example, you can point your FTP server to your LDAP server for authenticating FTP users. </p>
]]></content:encoded>
			<wfw:commentRss>http://agix.com.au/blog/?feed=rss2&#038;p=2851</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VNC over SSH (remote desktop)</title>
		<link>http://agix.com.au/blog/?p=2849</link>
		<comments>http://agix.com.au/blog/?p=2849#comments</comments>
		<pubDate>Tue, 17 Apr 2012 07:28:55 +0000</pubDate>
		<dc:creator>Andrew Galdes</dc:creator>
				<category><![CDATA[All Linux HowTo's]]></category>

		<guid isPermaLink="false">http://agix.com.au/blog/?p=2849</guid>
		<description><![CDATA[This article demonstrates how to run VNC (remote desktop tool) over an SSH (secure) session. This allows you to bypass firewalls preventing normal VNC communications (and where you cannot change the firewall to allow port 5901). In this example, the &#8220;workstation&#8221; is the computer that you&#8217;re sitting in front of. The &#8220;server&#8221; is the computer running the VNC server who&#8217;s desktop you are trying to see and control. On the workstation, run the following: ssh -C -f root@vnc-server.agix.in -L 5901:vnc-server.agix.in:5901 sleep 20 In the above we can see we&#8217;re connecting to the server as the root user. The remote server&#8217;s name is &#8220;vnc-server.agix.in&#8221;. We&#8217;re connecting to port 5901 (first VNC session) on the server. And we have 20 seconds to start the session starting from when we enter the root users password having run the above command. When the session is started, on the workstation run the VNCviewer program and connect to the address &#8220;localhost:5901&#8243;. You should then be connected to the servers VNC service.]]></description>
			<content:encoded><![CDATA[<p>This article demonstrates how to run VNC (remote desktop tool) over an SSH (secure) session. This allows you to bypass firewalls preventing normal VNC communications (and where you cannot change the firewall to allow port 5901). </p>
<p>In this example, the &#8220;workstation&#8221; is the computer that you&#8217;re sitting in front of. The &#8220;server&#8221; is the computer running the VNC server who&#8217;s desktop you are trying to see and control. </p>
<p>On the workstation, run the following:</p>
<pre>
ssh -C -f root@vnc-server.agix.in -L 5901:vnc-server.agix.in:5901 sleep 20
</pre>
<p>In the above we can see we&#8217;re connecting to the server as the root user. The remote server&#8217;s name is &#8220;vnc-server.agix.in&#8221;. We&#8217;re connecting to port 5901 (first VNC session) on the server. And we have 20 seconds to start the session starting from when we enter the root users password having run the above command. </p>
<p>When the session is started, on the workstation run the VNCviewer program and connect to the address &#8220;localhost:5901&#8243;. You should then be connected to the servers VNC service.  </p>
]]></content:encoded>
			<wfw:commentRss>http://agix.com.au/blog/?feed=rss2&#038;p=2849</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PlayStation 3 Media Server on Redhat</title>
		<link>http://agix.com.au/blog/?p=2845</link>
		<comments>http://agix.com.au/blog/?p=2845#comments</comments>
		<pubDate>Tue, 17 Apr 2012 00:58:54 +0000</pubDate>
		<dc:creator>Andrew Galdes</dc:creator>
				<category><![CDATA[All Linux HowTo's]]></category>

		<guid isPermaLink="false">http://agix.com.au/blog/?p=2845</guid>
		<description><![CDATA[The PlayStation 3 Media Server (PMS) allows owners of a playstation to watch movies, listen to music and browse photos that are centrally stored on a server. By using this method, other media players (such as modern TV&#8217;s, computers and purpose built media players) can use the same source of media without duplication. Installation of the PMS software is well documented at the link below: http://www.ps3mediaserver.org/forum/viewtopic.php?f=3&#038;t=9608 The configuration file below is modified as you made selection changes to via the PMS interface. However, we found it a little overwhelming &#8211; hence the need for the sample configuration below. As the root user, the configuration file is as follows: /root/.config/PMS/PMS.conf Below is a sample output of our test configuration file. Some defaults are left out by the PMS software. audiobitrate = 384 TranscodeExtensions=mp4,m4v thumbnails = true image_thumbnails = true minimized = false prevents_sleep_mode = true maximumbitrate = 0 folders = /home/movies,/home/music usecache = true hidevideosettings = true hide_media_library_folder = true hide_transcode_folder = true hide_extensions = true hide_empty_folders = true use_mplayer_for_video_thumbs = true hostname = 192.168.0.199 uuid = dc93f855-d15b-4d25-94bb-74d8e10ef8dd The PMS software can be started from the &#8220;/etc/rc.local&#8221; file for an automatic start. Of you can start it manually as needed.]]></description>
			<content:encoded><![CDATA[<p>The PlayStation 3 Media Server (PMS) allows owners of a playstation to watch movies, listen to music and browse photos that are centrally stored on a server. By using this method, other media players (such as modern TV&#8217;s, computers and purpose built media players) can use the same source of media without duplication. </p>
<p><img src="http://agix.com.au/blog/wp-content/uploads/2012/04/PMSdiagram.jpg" alt="" title="PMSdiagram" width="407" height="226" class="aligncenter size-full wp-image-2847" /></p>
<p>Installation of the PMS software is well documented at the link below:</p>
<p><a href="http://www.ps3mediaserver.org/forum/viewtopic.php?f=3&#038;t=9608">http://www.ps3mediaserver.org/forum/viewtopic.php?f=3&#038;t=9608</a></p>
<p>The configuration file below is modified as you made selection changes to via the PMS interface. However, we found it a little overwhelming &#8211; hence the need for the sample configuration below. As the root user, the configuration file is as follows:</p>
<pre>
/root/.config/PMS/PMS.conf
</pre>
<p>Below is a sample output of our test configuration file. Some defaults are left out by the PMS software. </p>
<pre>
audiobitrate = 384
TranscodeExtensions=mp4,m4v
thumbnails = true
image_thumbnails = true
minimized = false
prevents_sleep_mode = true
maximumbitrate = 0
folders = /home/movies,/home/music
usecache = true
hidevideosettings = true
hide_media_library_folder = true
hide_transcode_folder = true
hide_extensions = true
hide_empty_folders = true
use_mplayer_for_video_thumbs = true
hostname = 192.168.0.199
uuid = dc93f855-d15b-4d25-94bb-74d8e10ef8dd
</pre>
<p>The PMS software can be started from the &#8220;/etc/rc.local&#8221; file for an automatic start. Of you can start it manually as needed. </p>
]]></content:encoded>
			<wfw:commentRss>http://agix.com.au/blog/?feed=rss2&#038;p=2845</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NBN Broadband Prices Compared</title>
		<link>http://agix.com.au/blog/?p=2830</link>
		<comments>http://agix.com.au/blog/?p=2830#comments</comments>
		<pubDate>Mon, 16 Apr 2012 05:02:13 +0000</pubDate>
		<dc:creator>Andrew Galdes</dc:creator>
				<category><![CDATA[All Linux HowTo's]]></category>

		<guid isPermaLink="false">http://agix.com.au/blog/?p=2830</guid>
		<description><![CDATA[It&#8217;s never easy to compare prices between ISP&#8217;s because there are bundled prices, stand alone prices, contract prices, etc. Here is my best effort to get prices for the NBN as of this date. Having said that, i&#8217;ve ignored contract lengths but i have included my information sources for you to do more specific research. You should note that download quotas such as &#8220;20GB+20GB&#8221; indicate that quotas are in and out of hours. So 20GB in hours and 20GB at night. Internode: http://www.internode.on.net/residential/fibre_to_the_home/nbn_plans/ Telstra/Bigpond: http://www.telstra.com.au/bigpond-internet/national-broadband-network/our-plans/#tab-bigpond-velocity iinet: http://www.iinet.net.au/nbn/nbn-plan-residential.html]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s never easy to compare prices between ISP&#8217;s because there are bundled prices, stand alone prices, contract prices, etc. Here is my best effort to get prices for the NBN as of this date. Having said that, i&#8217;ve ignored contract lengths but i have included my information sources for you to do more specific research.<br />
<a href="http://agix.com.au/blog/wp-content/uploads/2012/04/nbncompared.tiff"><img src="http://agix.com.au/blog/wp-content/uploads/2012/04/nbncompared.tiff" alt="nbncompared" title="nbncompared" class="aligncenter size-full wp-image-2831" /></a><br />
You should note that download quotas such as &#8220;20GB+20GB&#8221; indicate that quotas are in and out of hours. So 20GB in hours and 20GB at night.</p>
<p>Internode: <a href="http://www.internode.on.net/residential/fibre_to_the_home/nbn_plans/">http://www.internode.on.net/residential/fibre_to_the_home/nbn_plans/</a></p>
<p>Telstra/Bigpond: <a href="http://www.telstra.com.au/bigpond-internet/national-broadband-network/our-plans/#tab-bigpond-velocity">http://www.telstra.com.au/bigpond-internet/national-broadband-network/our-plans/#tab-bigpond-velocity</a></p>
<p>iinet: <a href="http://www.iinet.net.au/nbn/nbn-plan-residential.html">http://www.iinet.net.au/nbn/nbn-plan-residential.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://agix.com.au/blog/?feed=rss2&#038;p=2830</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Essential SeLinux Commands</title>
		<link>http://agix.com.au/blog/?p=2824</link>
		<comments>http://agix.com.au/blog/?p=2824#comments</comments>
		<pubDate>Tue, 27 Mar 2012 05:30:35 +0000</pubDate>
		<dc:creator>Andrew Galdes</dc:creator>
				<category><![CDATA[All Linux HowTo's]]></category>

		<guid isPermaLink="false">http://agix.com.au/blog/?p=2824</guid>
		<description><![CDATA[This HowTo demonstrates the use of Selinux tools that every Linux system administrator should know. Consider reading &#8220;Getting started with Selinux&#8221; first. What are Selinux security context types? Selinux adds security contexts to files to prevent them from being used in unintended ways. For example, the file &#8220;/etc/ssh/sshd_config&#8221; has a security context type of &#8220;etc_t&#8221;. If we changed that context to be something else, Selinux wouldn&#8217;t permit the SSH daemon from starting. Another example is that the &#8220;/var/www/html/&#8221; directory has &#8220;httpd_sys_content_t&#8221;. If it were anything but that, the HTTPD daemon would not have access to it and fail to serve websites. Consider that because the security type is &#8220;httpd_sys_content_t&#8221;, the FTP server (for example) could not serve that directory. For the FTP server to serve data from the &#8220;/var/www/html/&#8221; directory, the directory would have to have a security context type of &#8220;public_content_t&#8221;. You can see now that security context types prevent compromised systems from using data in unintended ways. To see the current Selinux security context type of a directory: ls -dZ /var/www/html To copy security context type from &#8220;/var/www/html/&#8221; to &#8220;/home/var/www/html/&#8221; you would do this: chcon -R --reference /var/www/html /home/var/www/html The above would &#8220;relabel&#8221; the directory &#8220;/home/var/www/html/&#8221; with the [...]]]></description>
			<content:encoded><![CDATA[<p>This HowTo demonstrates the use of Selinux tools that every Linux system administrator should know. Consider reading &#8220;<a href="http://agix.com.au/blog/?p=2613">Getting started with Selinux</a>&#8221; first. </p>
<p><strong>What are Selinux security context types?</strong></p>
<p>Selinux adds security contexts to files to prevent them from being used in unintended ways. For example, the file &#8220;/etc/ssh/sshd_config&#8221; has a security context type of &#8220;etc_t&#8221;. If we changed that context to be something else, Selinux wouldn&#8217;t permit the SSH daemon from starting. Another example is that the &#8220;/var/www/html/&#8221; directory has &#8220;httpd_sys_content_t&#8221;. If it were anything but that, the HTTPD daemon would not have access to it and fail to serve websites. Consider that because the security type is &#8220;httpd_sys_content_t&#8221;, the FTP server (for example) could not serve that directory. For the FTP server to serve data from the &#8220;/var/www/html/&#8221; directory, the directory would have to have a security context type of &#8220;public_content_t&#8221;. You can see now that security context types prevent compromised systems from using data in unintended ways. </p>
<p>To see the current Selinux security context type of a directory:</p>
<pre>
ls -dZ /var/www/html
</pre>
<p>To copy security context type from &#8220;/var/www/html/&#8221; to &#8220;/home/var/www/html/&#8221; you would do this:</p>
<pre>
chcon -R --reference /var/www/html /home/var/www/html
</pre>
<p>The above would &#8220;relabel&#8221; the directory &#8220;/home/var/www/html/&#8221; with the same Selinux security context type as the directory &#8220;/var/www/html/&#8221;. Whilst that would survive a reboot, it would not survive a &#8220;relabel&#8221;. A relabel is a process were Selinux goes through files (either all files or specified files) and sets their security types to what it reads from the file &#8220;/etc/selinux/targeted/contexts/files/file_contexts&#8221;. We can save the changes we made in the example above by issuing the following command. Note that for custom security types (as we are doing right now) another file is used to store our changes, &#8220;/etc/selinux/targeted/contexts/files/file_contexts.local&#8221;. This is to keep the systems context types separate from our custom types. </p>
<pre>
semanage fcontext -a -t httpd_sys_content_t /home/var/www/html
</pre>
<p>The above command states that &#8220;-a&#8221; is to add a new directory to the &#8220;/etc/selinux/targeted/contexts/files/file_contexts.local&#8221; file. And the security context type &#8220;-t&#8221; is &#8220;httpd_sys_content_t&#8221;.</p>
<p>To reinstate default security context types to the &#8220;/etc&#8221; directory:</p>
<pre>
restorecon -rv /etc
</pre>
<p>In the above example, the &#8220;-r&#8221; means to recursively relabel files and directories. The &#8220;-v&#8221; means to be verbose about changes and print them to the screen as changes are made. Note that the above example checks both the &#8220;/etc/selinux/targeted/contexts/files/file_contexts&#8221; and &#8220;/etc/selinux/targeted/contexts/files/file_contexts.local&#8221; files for changes to make. </p>
]]></content:encoded>
			<wfw:commentRss>http://agix.com.au/blog/?feed=rss2&#038;p=2824</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

