<?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/"
	>

<channel>
	<title>synapse unsync</title>
	<atom:link href="http://blogwords.neologix.net/neils/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blogwords.neologix.net/neils</link>
	<description>disconnected thoughts and random brain dumps</description>
	<pubDate>Sun, 24 May 2009 21:48:11 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>OpenLDAP Replication with LDAP sync</title>
		<link>http://blogwords.neologix.net/neils/?p=140</link>
		<comments>http://blogwords.neologix.net/neils/?p=140#comments</comments>
		<pubDate>Sun, 24 May 2009 04:56:53 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Centos 5.x]]></category>

		<category><![CDATA[IT Stuff]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[authentication]]></category>

		<category><![CDATA[ldap]]></category>

		<category><![CDATA[openldap]]></category>

		<category><![CDATA[centos]]></category>

		<category><![CDATA[replication]]></category>

		<category><![CDATA[systems administration]]></category>

		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://blogwords.neologix.net/neils/?p=140</guid>
		<description><![CDATA[First some background stuff - this work was all done on Centos 5.3 i386 using openldap 2.3. You need a basic working OpenLDAP configuration such as in my notes Configuring OpenLDAP. The other thing you need to be aware of when setting up LDAP sync with the Centos 5.x distro is that, like RedHat, the [...]]]></description>
			<content:encoded><![CDATA[<p>First some background stuff - this work was all done on Centos 5.3 i386 using openldap 2.3. You need a basic working OpenLDAP configuration such as in my notes <a target="_blank" href="http://blogwords.neologix.net/neils/2009/05/03/configuring-openldap">Configuring OpenLDAP</a>. The other thing you need to be aware of when setting up LDAP sync with the Centos 5.x distro is that, like RedHat, the syncprov module is statically linked with slapd which means that the notes that refer to using the moduleload functionality with syncprov.la do not apply to Centos. LDAP sync replication is essentially a &#8220;pull&#8221; replication model which is different from the deprecated slurpd&#8217;s &#8220;push&#8221; replication.</p>
<p>These notes relate to a simple ldap sync setup with 1 provider and 1 consumer. In LDAP sync jargon a &#8220;provider&#8221; is the source of updates and a &#8220;consumer&#8221; is the openldap which is to be updated. There are various models for ldap sync, in this version which is the simplest all the data for all records are copied when there is a change but there are more sophisticated models which only copy the changes. This can be useful if you have a large directory.</p>
<p>The provider has only 2 configuration directives for setting checkpoints on the contextCSN and configuring the session log. Because ldap sync search is subject to access control you must ensure proper acl privileges are set for the replicated content.</p>
<p>In the provider&#8217;s slapd.conf add:</p>
<blockquote><p>
<code>index entryCSN,entryUUID&nbsp;&nbsp;&nbsp;&nbsp;eq,pres</code></p></blockquote>
<p>then add:</p>
<blockquote><p>
<code>overlay syncprov</code><br />
<code>syncprov-checkpoint 100 10</code><br />
<code>syncprov-sessionlog 100</code></p>
<p><code>limits dn.exact="cn=syncuser,dc=mydomain,dc=com" size=unlimited time=unlimited</code>
</p></blockquote>
<p>The <code>limits</code> entry is a good idea to help keep the consumer in sync during a large modification.</p>
<p>I also added a syncuser to my directory with an ldif like:</p>
<blockquote><p>
<code>dn: cn=syncuser,dc=mydomain,dc=com</code><br />
<code>uid: syncuser</code><br />
<code>cn: syncuser</code><br />
<code>sn: syncuser</code><br />
<code>objectClass: inetLocalMailRecipient</code><br />
<code>objectClass: person</code><br />
<code>objectClass: organizationalPerson</code><br />
<code>objectClass: inetOrgPerson</code><br />
<code>objectClass: posixAccount</code><br />
<code>objectClass: top</code><br />
<code>objectClass: shadowAccount</code><br />
<code>userPassword: e1NTSEF9NERla1JTSWwxa0tDU0FHRU5SUVZudVh4L1VyamJ1dFQ=</code><br />
<code>shadowLastChange: 14387</code><br />
<code>shadowMax: 99999</code><br />
<code>shadowWarning: 7</code><br />
<code>loginShell: /bin/bash</code><br />
<code>uidNumber: 501</code><br />
<code>gidNumber: 501</code><br />
<code>homeDirectory: /home/syncuser</code><br />
<code>gecos: syncuser</code>
</p></blockquote>
<p>On the consumer add in slapd.conf:</p>
<blockquote><p>
<code>index entryCSN,entryUUID&nbsp;&nbsp;&nbsp; eq,pres</code>
</p></blockquote>
<p>and then:</p>
<blockquote><p>
<code>syncrepl rid=101</code><br />
<code>&nbsp;&nbsp;&nbsp; provider=ldap://ldap.mydomain.com:389</code><br />
<code>&nbsp;&nbsp;&nbsp; type=refreshOnly</code><br />
<code>&nbsp;&nbsp;&nbsp; interval=00:01:00:00</code><br />
<code>&nbsp;&nbsp;&nbsp; searchbase="dc=mydomain,dc=com"</code><br />
<code>&nbsp;&nbsp;&nbsp; filter="(objectclass=*)"</code><br />
<code>&nbsp;&nbsp;&nbsp; attrs="*,+"</code><br />
<code>&nbsp;&nbsp;&nbsp; scope=sub</code><br />
<code>&nbsp;&nbsp;&nbsp; schemachecking=off</code><br />
<code>&nbsp;&nbsp;&nbsp; bindmethod=simple</code><br />
<code>&nbsp;&nbsp;&nbsp; binddn="cn=syncuser,dc=mydomain,dc=com"</code><br />
<code>&nbsp;&nbsp;&nbsp; credentials=secret</code>
</p></blockquote>
<p>where:<br />
<code>rid=101</code> is the id for this query; it must be unique across all consumers<br />
<code>provider=xx</code> is the server this consumer will query<br />
<code>type=refreshOnly</code> means that after the initial sync the sync query will rerun at the time specified by interval<br />
<code>interval=00:01:00:00</code> means the sync query will reschedule after 1 hour<br />
<code>searchbase=xx</code> the start at the root of the tree<br />
<code>filter="(objectclass=*)"</code> look for everything<br />
<code>scope=sub</code> search recursively<br />
<code>attrs="*,+"</code> copy all attributes which is the default setting so there is no need to specify this<br />
<code>schemachecking=off</code> the provider should already be doing this<br />
<code>binddn=xx</code> is the user on the provider who the consumer will use for its queries<br />
<code>bindmethod=simple</code> use plaintext passwords<br />
<code>credentials=secret</code> the syncuser password</p>
<p>There are other options, instead of <code>type=refreshOnly</code> you could have <code>type=refreshAndPersist</code> which means that after the initial query the sync will stay open and any other changes will be transferred immediately. If you change your type setting you may want to remove the interval setting and add <code>retry="60 +"</code> which means that if network connectivity is lost between the consumer and the provider, the consumer will try every 60 seconds indefinitely to re-establish a network connection with the provider.</p>
<p>Now restart slapd on the provider and then on the consumer.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogwords.neologix.net/neils/?feed=rss2&amp;p=140</wfw:commentRss>
		</item>
		<item>
		<title>VMWare &amp; Virtual Machine Replication</title>
		<link>http://blogwords.neologix.net/neils/?p=120</link>
		<comments>http://blogwords.neologix.net/neils/?p=120#comments</comments>
		<pubDate>Sun, 24 May 2009 03:11:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Databases]]></category>

		<category><![CDATA[IT Stuff]]></category>

		<category><![CDATA[VMWare]]></category>

		<category><![CDATA[Virtualisation]]></category>

		<category><![CDATA[backup]]></category>

		<category><![CDATA[disaster recovery]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[replication]]></category>

		<category><![CDATA[virtual machine]]></category>

		<category><![CDATA[Vizioncore]]></category>

		<category><![CDATA[vm]]></category>

		<category><![CDATA[vReplicator]]></category>

		<guid isPermaLink="false">http://blogwords.neologix.net/neils/?p=120</guid>
		<description><![CDATA[This is a brief look at the use of vReplicator from Vizioncore for replicating VMWare VMs to a disaster recovery site. The information is based on my experiences in setting up this environment for my employers.
Main site is a VMWare ESX 3.5 HA cluster (Intel CPUs) and SAN with multiple VMFS filesystems. Remote site (300K [...]]]></description>
			<content:encoded><![CDATA[<p>This is a brief look at the use of vReplicator from <a href="http://www.vizioncore.com" target="_blank">Vizioncore</a> for replicating VMWare VMs to a disaster recovery site. The information is based on my experiences in setting up this environment for my employers.</p>
<p>Main site is a VMWare ESX 3.5 HA cluster (Intel CPUs) and SAN with multiple VMFS filesystems. Remote site (300K from main office) is a single VMWare server (AMD CPUs) with 2 VMFS filesystems on RAIDed internal storage. The 2 sites are connected by 10Mbps optical fibre. Both sites are  managed through Virtual Center which is installed into a VM in our main site. To backup our main site VMs (including Virtual Center) we decided to use vReplicator from Vizioncore.</p>
<p>Installation was very easy, just run the installer and follow the prompts to set it up - we installed vReplicator into the same VM as our Virtual Center installation. vReplicator logged in to our VC and discovered our HA cluster, the VMs it contained and also our remote server and its VMs.</p>
<p>Using it was just as easy, you select the VM you want to replicate, click the &#8220;Create Job&#8221; link and complete the details. There are dropdowns for resources like VMFS filesystems on the target and you can select which of the VM&#8217;s disks replicate to which remote VMFS filesystem.</p>
<p>Which type of replication? We used what vReplicator refers to as &#8220;Differential&#8221; replication which is essentially a point-in-time comparison of original and replicated VMs and uses a VM snapshot to capture changed data. The other type of replication supported by vReplicator is called &#8220;Hybrid&#8221;. Hybrid replication uses a &#8220;change over time&#8221; model to identify what should be replicated. It is faster because there is no need to scan during the replication pass but uses more disk space for its (2) snapshots. It was largely because of constraints on the amount of disk space available for snapshots that we selected &#8220;Differential&#8221; replication.</p>
<p>Once you save a job you can leave it to autostart at the time/date you designated or you can run the job now by clicking the &#8220;Run&#8221; menu item for the job. The first replication takes quite some time as the entire VM has to be copied. Subsequent runs are much quicker. In our case a replicate job for a fairly static VM which took 3 hours for the first run takes around 30mins for 2nd and subsequent runs; another job for our main SQLServer2005 VM which took 11 hours for the first run takes about 2-3 hours for 2nd and subsequent runs.</p>
<p>At the moment we are replicating 4 VMs, all Windows 2003, including our Virtual Center VM and 2 SQLServer database installations (different vesions). Shortly we will be adding Centos 5.x Linux VMs with our mailserver and Samba installations. </p>
<p>So vReplicator in a nutshell, easy to install, easy to setup and configure and easy to run. Things to watch out for are that you have enough space for the snapshots that vReplicator uses and that you have enough bandwidth to move the amount of data you want to move in the time window you have available.</p>
<p>Separately to the VM replication outlined above we have an additional Linux VM in our remote site which has a redundant DNS server, a synchronised OpenLDAP replication configuration and a redundant RADIUS server. These servers provide secondary DNS, radius and authentication services for both our main site, our remote site and regional offices.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogwords.neologix.net/neils/?feed=rss2&amp;p=120</wfw:commentRss>
		</item>
		<item>
		<title>Configuring a Restriced Shell using rssh</title>
		<link>http://blogwords.neologix.net/neils/?p=105</link>
		<comments>http://blogwords.neologix.net/neils/?p=105#comments</comments>
		<pubDate>Mon, 04 May 2009 11:23:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Centos 5.x]]></category>

		<category><![CDATA[IT Stuff]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[restricted shell]]></category>

		<category><![CDATA[rssh]]></category>

		<category><![CDATA[security]]></category>

		<category><![CDATA[ssh]]></category>

		<category><![CDATA[systems administration]]></category>

		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://blogwords.neologix.net/neils/?p=105</guid>
		<description><![CDATA[These notes refer to building rssh on Centos 5.3. I do not cover chrooting the user within their restricted shell because I could not get it working satisfactorily.  Nor do I cover the reasons why you might want to use a restricted shell.
The steps I followed were:
Get the code
(1) download the source rpm (2.3.2 [...]]]></description>
			<content:encoded><![CDATA[<p>These notes refer to building rssh on Centos 5.3. I do not cover chrooting the user within their restricted shell because I could not get it working satisfactorily.  Nor do I cover the reasons why you might want to use a restricted shell.</p>
<p>The steps I followed were:</p>
<p><strong>Get the code</strong><br />
(1) download the source rpm (2.3.2 at time of writing)<br />
(2) install the gpg key<br />
&nbsp;&nbsp;<code>rpm --import http://www.pizzashack,org/ddmkey.txt</code><br />
(3) build the source package<br />
&nbsp;&nbsp;<code>rpmbuild -v --rebuild rssh-2.3.2-1.src.rpm</code><br />
(4) install the newly built rpm<br />
&nbsp;&nbsp;<code>rpm -ivh /usr/src/redhat/RPMS/i386/rssh-2.3.2-1.i386.rpm</code></p>
<p><strong>Configuring rssh (no chroot)</strong><br />
(1) edit the /etc/rssh.conf file and uncomment the #allowsftp line (and/or #allowscp and/or #allowrsync etc) to allow sftp access (and/or scp and/or rsync etc)<br />
(2) create your user (eg for a user John Citizen)<br />
&nbsp;&nbsp;<code>useradd -m -d /home/jcitizen -s /usr/bin/rssh jcitizen<br />
	passwd jcitizen</code><br />
(3) test the login for jcitizen from another machine<br />
&nbsp;&nbsp;&nbsp;(a) connect using ssh<br />
&nbsp;&nbsp;&nbsp;<code>ssh jcitizen@rsshserver.mydomain.com</code></p>
<p>&nbsp;&nbsp;&nbsp;you should see output something like:</p>
<blockquote><p><code>Last login: Sat Apr 25 11:00:11 2009 from 192.168.0.10</code></p>
<p>	<code>This account is restricted by rssh.<br />
	Allowed commands: scp sftp rsync</code></p>
<p>	<code>If you believe this is in error, please contact your system administrator.</code></p>
<p>	<code>Connection to rsshserver.mydomain.com closed.</code></p></blockquote>
<p>&nbsp;&nbsp;&nbsp;(b) connect using sftp<br />
&nbsp;&nbsp;&nbsp;<code>sftp jcitizen@rsshserver.mydomain.com</code></p>
<p>&nbsp;&nbsp;&nbsp;You should now see some output something like:</p>
<blockquote><p><code>Connecting to rsshserver.mydomain.com...<br />
	jcitizen@rsshserver.mydomain.com's password:<br />
	sftp> </code></p></blockquote>
<p>(4) Important - note that this type of configuration will apply to all users with the rssh shell. It is also possible to configure rssh on a per user basis.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogwords.neologix.net/neils/?feed=rss2&amp;p=105</wfw:commentRss>
		</item>
		<item>
		<title>FreeRadius+OpenLDAP</title>
		<link>http://blogwords.neologix.net/neils/?p=47</link>
		<comments>http://blogwords.neologix.net/neils/?p=47#comments</comments>
		<pubDate>Sun, 03 May 2009 08:33:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Centos 5.x]]></category>

		<category><![CDATA[IT Stuff]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[authentication]]></category>

		<category><![CDATA[ldap]]></category>

		<category><![CDATA[openldap]]></category>

		<category><![CDATA[radius]]></category>

		<category><![CDATA[centos]]></category>

		<category><![CDATA[directory services]]></category>

		<guid isPermaLink="false">http://blogwords.neologix.net/neils/?p=47</guid>
		<description><![CDATA[How to make freeradius use openldap as an authentication source. 
This was tested on Centos 5.3. Freeradius and OpenLDAP were installed using the &#8220;Add/Remove Software&#8221; item on the Applications menu - no rocket science here! The article assumes that you already have a working ldap server (or see my article on Configuring OpenLDAP).
(1) In radiusd.conf [...]]]></description>
			<content:encoded><![CDATA[<p><strong>How to make freeradius use openldap as an authentication source. </strong><br />
This was tested on Centos 5.3. Freeradius and OpenLDAP were installed using the &#8220;Add/Remove Software&#8221; item on the Applications menu - no rocket science here! The article assumes that you already have a working ldap server (or see my article on <a href="http://blogwords.neologix.net/neils/2009/05/03/configuring-openldap/">Configuring OpenLDAP</a>).</p>
<p>(1) In radiusd.conf edit the modules section for ldap so that it reads something like:</p>
<p><code>ldap {<br />
      server = "myhost.mydomain.com"<br />
      identity = "cn=manager,dc=mydomain,dc=com"<br />
      password = mysecret<br />
      basedn = "dc=mydomain,dc=com"<br />
      filter = "(uid=%u)"<br />
      start_tls = no<br />
      access_attr = uid<br />
      dictionary_mapping = $(raddbdir/ldap.attrmap<br />
      ldap_connections_number = 5<br />
      timeout = 4<br />
      timelimit = 3<br />
      net_timeout = 1<br />
}</code></p>
<p>(2) Find the authorize section of radiusd.conf find the line which starts <code>#ldap</code> and remove the <code>'#'</code> so it reads just <code>ldap</code></p>
<p>(3) Again in radiusd.conf, but in the authentication section, find the lines:</p>
<p><code># Auth-Type LDAP {<br />
#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ldap<br />
#}</code></p>
<p>and remove the <code>'#'</code> so these lines read</p>
<p><code>Auth-Type LDAP {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ldap<br />
}</code></p>
<p>(4) In the /etc/raddb/users file find the section which reads</p>
<p><code>DEFAULT Auth-Type = System<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fall-Through = 1</code></p>
<p>and replace it with</p>
<p><code>DEFAULT Auth-Type = LDAP<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fall-Through = 1</code></p>
<p>(5) Restart the radiusd daemon <code>/etc/init.d/radiusd restart</code><br />
(6) Assuming that your /etc/raddb/clients.conf has a section that reads </p>
<p><code>clients 127.0.0.1 {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;secret = testing123<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;shortname = localhost<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;nastype = other<br />
}</code></p>
<p>and also that you have an entry in your ldap directory like </p>
<p><code>	dn: uid=john,ou=users,dc=mydomain,dc=com<br />
	uid: john<br />
	cn: john<br />
	givenName: john<br />
	sn: doe<br />
	mail: john@mydomain.com<br />
	mailRoutingAddress: john@mail.prod.mydomain.com<br />
	mailHost: mail.prod.mydomain.com<br />
	objectClass: inetLocalMailRecipient<br />
	objectClass: person<br />
	objectClass: organizationalPerson<br />
	objectClass: inetOrgPerson<br />
	objectClass: posixAccount<br />
	objectClass: top<br />
	objectClass: shadowAccount<br />
	userPassword: {crypt}$1$EwO.4wlT$n5KoIfFE8qcDcPAC12vxn2<br />
	shadowLastChange: 14360<br />
	shadowMax: 99999<br />
	shadowWarning: 7<br />
	loginShell: /bin/bash<br />
	uidNumber: 503<br />
	gidNumber: 503<br />
	homeDirectory: /home/john<br />
	gecos: john doe</code></p>
<p>and that jdoe&#8217;s password is mysecret, you can test your radius configuration by executing</p>
<p><code>radtest john mysecret 127.0.0.1 10 testing123</code></p>
<p>You should see a reply like </p>
<p><code>	Sending Access-Request of id 65 to 127.0.0.1 port 1812<br />
&nbsp;&nbsp;&nbsp;&nbsp;User-Name = "jdoe"<br />
&nbsp;&nbsp;&nbsp;&nbsp;User-Password = "secret"<br />
&nbsp;&nbsp;&nbsp;&nbsp;NAS-IP-Address = 255.255.255.255<br />
&nbsp;&nbsp;&nbsp;&nbsp;NAS-Port = 10<br />
	rad_recv: Access-Accept packet from host 127.0.0.1:1812, id=65, length=20</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blogwords.neologix.net/neils/?feed=rss2&amp;p=47</wfw:commentRss>
		</item>
		<item>
		<title>Configuring OpenLDAP</title>
		<link>http://blogwords.neologix.net/neils/?p=27</link>
		<comments>http://blogwords.neologix.net/neils/?p=27#comments</comments>
		<pubDate>Sun, 03 May 2009 07:36:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[IT Stuff]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[authentication]]></category>

		<category><![CDATA[ldap]]></category>

		<category><![CDATA[openldap]]></category>

		<category><![CDATA[centos]]></category>

		<category><![CDATA[systems administration]]></category>

		<guid isPermaLink="false">http://blogwords.neologix.net/neils/?p=27</guid>
		<description><![CDATA[This was used to configure OpenLDAP on Centos 5.3
Initial Configuration of slapd.conf
(1) You need the following schemas included:
include               /etc/openldap/schema/core.schema
include               /etc/openldap/schema/cosine.schema
include        [...]]]></description>
			<content:encoded><![CDATA[<p>This was used to configure OpenLDAP on Centos 5.3</p>
<p><strong>Initial Configuration of slapd.conf</strong><br />
(1) You need the following schemas included:</p>
<p><code>include               /etc/openldap/schema/core.schema<br />
include               /etc/openldap/schema/cosine.schema<br />
include               /etc/openldap/schema/inetorgperson.schema<br />
include               /etc/openldap/schema/nis.schema</code></p>
<p>(2) depending on what you might be planning for your ldap server you might also want to include:<br />
<code><br />
include /etc/openldap/schema/misc.schema<br />
include /etc/openldap/schema/RADIUS-LDAPv3.schema</code></p>
<p>(3) For these initial tests I am not going to configure TLS but for a production system you should be using TLS</p>
<p>(4) enable an acl that will allow users to modify their own information<br />
<code>access to dn.base="" by * read<br />
access to dn.base="cn=Subschema" by * read<br />
access to *<br />
      by self write<br />
      by users read<br />
      by anonymous auth</code></p>
<p>(5) configure your suffix and rootdn<br />
<code>suffix                "dc=mydomain,dc=com"<br />
rootdn                "cn=manager,dc=mydomain,dc=com"</code></p>
<p>(6) generate your management password with the command </p>
<p><code>slappasswd -s secret -h {SSHA}</code></p>
<p>where -s specifies the password to encrypt and -h the encryption scheme. Use man slappasswd for more information. Paste the output into your slapd.conf file as:</p>
<p><code>rootpw	{SSHA}D74b0UDGxQ43biWJXCNLTw1Q+MsAlvti</code></p>
<p>(7) Now save your slapd.conf file</p>
<p>(8) Start ldap with </p>
<p><code>/etc/init.d/ldap start</code></p>
<p>To make ldap start automatically whenever the system starts <code>chkconfig ldap on</code></p>
<p><strong>Create the Directory Contents</strong><br />
<em><strong>Creating the initial user and group ldif import files</strong></em><br />
(1) download the current version of the padl migration scripts from <a href="http://www.padl.com/OSS/MigrationTools.html" target="_blank">http://www.padl.com/OSS/MigrationTools.html</a></p>
<p>(2) unpack the tools (eg. use the command &#8216;tar zxvf MigrationTools.tgz&#8217; which will create a subdirectory such as MigrationTools-47 with the padl migration scripts in the current directory)<br />
(3) cd in to the newly created scripts directory<br />
(4) edit the migrate_common.ph script (eg. vi migrate_common.ph) and set the following variables to appropriate values:<br />
<code>	$DEFAULT_MAIL_DOMAIN = "mydomain.com";<br />
	$DEFAULT_BASE = "dc=mydomain,dc=com";<br />
	$DEFAULT_MAIL_HOST = "mail.prod.mydomain.com";<br />
	$EXTENDED_SCHEMA = 1;</code></p>
<p>	I also updated all the cn=Xxx values to all lowercase but this is just my personal preference<br />
(5) Unless you are using Kerberos and have the appropriate schema loaded into your slapd.conf you should also edit the migrate_common.ph script so that the lines</p>
<p><code>	# Default Kerberos realm<br />
	if ($EXTENDED_SCHEMA) {<br />
       		$DEFAULT_REALM = $DEFAULT_MAIL_DOMAIN;<br />
       		$DEFAULT_REALM =~ tr/a-z/A-Z/;<br />
	}</code><br />
 are commented out thus<br />
<code>	# Default Kerberos realm<br />
	#if ($EXTENDED_SCHEMA) {<br />
       	#	$DEFAULT_REALM = $DEFAULT_MAIL_DOMAIN;<br />
       	#	$DEFAULT_REALM =~ tr/a-z/A-Z/;<br />
	#}</code></p>
<p>(6) Assuming your initial passwd, shadow and group files are located in the directory above your current working directory you can now use the commands &#8230;</p>
<p><code>	./migrate_passwd.pl ../passwd.in  ../passwwd_out.ldif<br />
	./migrate_group.pl ../group.in	../group_out.ldif</code></p>
<p>&#8230; to generate your ldif import files</p>
<p>For a sample passwd, shadow and group file that only contains the 1 user with the following information</p>
<p><code>	passwd: john:x:503:503:john doe:/home/john:/bin/bash<br />
	shadow: john:$1$EwO.4wlT$n5KoIfFE8qcDcPAC12vxn2:14360:0:99999:7:::<br />
	group:  john:x:503:<br />
	            users:x:100:john</code></p>
<p>	you will get the following passwd_out.ldif information:</p>
<p><code>	dn: uid=john,ou=users,dc=mydomain,dc=com<br />
	uid: john<br />
	cn: john<br />
	givenName: john<br />
	sn: doe<br />
	mail: john@mydomain.com<br />
	mailRoutingAddress: john@mail.prod.mydomain.com<br />
	mailHost: mail.prod.mydomain.com<br />
	objectClass: inetLocalMailRecipient<br />
	objectClass: person<br />
	objectClass: organizationalPerson<br />
	objectClass: inetOrgPerson<br />
	objectClass: posixAccount<br />
	objectClass: top<br />
	objectClass: shadowAccount<br />
	userPassword: {crypt}$1$EwO.4wlT$n5KoIfFE8qcDcPAC12vxn2<br />
	shadowLastChange: 14360<br />
	shadowMax: 99999<br />
	shadowWarning: 7<br />
	loginShell: /bin/bash<br />
	uidNumber: 503<br />
	gidNumber: 503<br />
	homeDirectory: /home/john<br />
	gecos: john doe</code></p>
<p>	and group_out.ldif information</p>
<p><code>	dn: cn=users,ou=groups,dc=mydomain,dc=com<br />
	objectClass: posixGroup<br />
	objectClass: top<br />
	cn: users<br />
	userPassword: {crypt}x<br />
	gidNumber: 100<br />
	memberUid: john</code></p>
<p><code>	dn: cn=john,ou=groups,dc=mydomain,dc=com<br />
	objectClass: posixGroup<br />
	objectClass: top<br />
	cn: john<br />
	userPassword: {crypt}x<br />
	gidNumber: 503</code></p>
<p><strong><em>Create Containers For Users And Groups</em></strong></p>
<p>(1) the contents of the file mydomain.com_ldap_init.ldif:</p>
<p><code># Set up the origanisation container<br />
dn: dc=mydomain,dc=com<br />
objectclass: dcObject<br />
objectclass: organization<br />
o: Neologix Pty Ltd<br />
dc: neologix</code></p>
<p><code># set up a users container<br />
dn: ou=users,dc=mydomain,dc=com<br />
objectclass: organizationalUnit<br />
ou: users</code></p>
<p><code># set up a groups container<br />
dn: ou=group,dc=mydomain,dc=com<br />
objectclass: organizationalUnit<br />
ou: group</code></p>
<p><code># set up a hosts container<br />
dn: ou=hosts,dc=mydomain,dc=com<br />
objectclass: organizationalUnit<br />
ou: hosts</code></p>
<p>(2) Initialize the directory<br />
<code>ldapadd -x -D 'cn=manager,dc=mydomain,dc=com' -W -f ./mydomain.com_ldap_init.ldif</code></p>
<p>(3) Add the users and groups (files are ldap_passwd.ldif and ldap_group.ldif cwd) to the ldap directory using the files you created above</p>
<p><code>ldapadd -x -D 'cn=manager,dc=mydomain,dc=com' -W -f ./ldap_passwd.ldif<br />
ldapadd -x -D 'cn=manager,dc=mydomain,dc=com' -W -f ./ldap_group.ldif </code></p>
<p>(4) Now test your directory<br />
<em>(a) searching for everything </em><br />
<code>ldapsearch -x -D'cn=manager,dc=mydomain,dc=com' -b'dc=mydomain,dc=com' -W '(objectclass=*)'</code></p>
<p><em>(b) reset a user password</em><br />
<code>ldappasswd -D"cn=manager,dc=mydomain,dc=com" -x -W -S "uid=john,ou=users,dc=mydomain,dc=com"</code></p>
<p>You should now have a basic, working ldap directory server.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogwords.neologix.net/neils/?feed=rss2&amp;p=27</wfw:commentRss>
		</item>
		<item>
		<title>Basic freeradius Configuration</title>
		<link>http://blogwords.neologix.net/neils/?p=20</link>
		<comments>http://blogwords.neologix.net/neils/?p=20#comments</comments>
		<pubDate>Sun, 03 May 2009 07:07:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Centos 5.x]]></category>

		<category><![CDATA[IT Stuff]]></category>

		<category><![CDATA[authentication]]></category>

		<category><![CDATA[radius]]></category>

		<category><![CDATA[centos]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[radiusd]]></category>

		<category><![CDATA[systems administration]]></category>

		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://blogwords.neologix.net/neils/?p=20</guid>
		<description><![CDATA[This is a very basic configuration for freeradius to allow authentication from passwd and shadow files. It has been tested on Centos 5.3
(1) The freeradius configuraton files are usually in /etc/raddb; make a subdirectory /etc/raddb/etc
(2) copy your /etc/passwd and /etc/shadow  files to /etc/raddb/etc
(3) edit the /etc/raddb/etc/passwd and /etc/raddb/etc/shadow files to remove all entries except for [...]]]></description>
			<content:encoded><![CDATA[<p>This is a very basic configuration for freeradius to allow authentication from passwd and shadow files. It has been tested on Centos 5.3</p>
<p>(1) The freeradius configuraton files are usually in /etc/raddb; make a subdirectory /etc/raddb/etc<br />
(2) copy your /etc/passwd and /etc/shadow  files to /etc/raddb/etc<br />
(3) edit the /etc/raddb/etc/passwd and /etc/raddb/etc/shadow files to remove all entries except for those that you want to authenticate with radius<br />
(4) edit the /etc/raddb/radiusd.conf file; find the section:</p>
<p><code><br />
unix {<br />
...</code></p>
<p>and set the values for the passwd and shadow files so they read:</p>
<p><code><br />
passwd = /etc/raddb/etc/passwd<br />
shadow = /etc/raddb/etc/shadow<br />
</code></p>
<p>(5) save radiusd.conf<br />
(6) make sure the radiusd user can read  the files</p>
<p><code>chmod -R 644 /etc/raddb/etc</code></p>
<p>(7) check the /etc/raddb/users file to ensure that the following exists:</p>
<p><code>DEFAULT     Auth-Type = System<br />
Fall-Through = 1</code></p>
<p>(8) Assuming you have entries in the /etc/raddb/etc/passwd and /etc/raddb/etc/shadow for a user &#8216;jdoe&#8217; with password of &#8217;secret&#8217; you can test your radius configuration by:<br />
(a) start the radius daemon with &#8216;/etc/init.d/radiusd start&#8217;; you should see some output something like:</p>
<p><code>[root@myserver raddb]# /etc/init.d/radiusd start<br />
Starting RADIUS server: Sun May  3 13:26:37 2009 : Info: Starting - reading configuration files &#8230; [  OK  ]</code></p>
<p>(b) execute the command &#8216;radtest jdoe secret 127.0.0.1 10 testing123&#8242;. Assuming it all works you should see output something like:</p>
<p><code><br />
[root@myserver raddb]# radtest jdoe secret 127.0.0.1 10 testing123<br />
Sending Access-Request of id 65 to 127.0.0.1 port 1812<br />
User-Name = &#8220;jdoe&#8221;<br />
User-Password = &#8220;secret&#8221;<br />
NAS-IP-Address = 255.255.255.255<br />
NAS-Port = 10<br />
rad_recv: Access-Accept packet from host 127.0.0.1:1812, id=65, length=20<br />
</code></p>
<p>Note that the radius client password is the cleartext password specified for the client in clients.conf and the nas-port-number parameter can be any value between 0 and 2^31 so 10 is fine.</p>
<p>If you received the Access-Accept message then congratulations, you have radius working, if not then go back and check your configuration and permissions.</p>
<p>(9) You can have the radius daemon start automatically by executing &#8216;chkconfig radiusd on&#8217;</p>
]]></content:encoded>
			<wfw:commentRss>http://blogwords.neologix.net/neils/?feed=rss2&amp;p=20</wfw:commentRss>
		</item>
		<item>
		<title>Configuring an NTP Server</title>
		<link>http://blogwords.neologix.net/neils/?p=19</link>
		<comments>http://blogwords.neologix.net/neils/?p=19#comments</comments>
		<pubDate>Mon, 13 Apr 2009 04:32:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[IT Stuff]]></category>

		<category><![CDATA[NTP]]></category>

		<category><![CDATA[Time]]></category>

		<category><![CDATA[ntpd]]></category>

		<category><![CDATA[Solaris]]></category>

		<category><![CDATA[time server]]></category>

		<category><![CDATA[xntpd]]></category>

		<guid isPermaLink="false">http://blogwords.neologix.net/neils/?p=19</guid>
		<description><![CDATA[These notes were based on work done with Solaris 10 but I think the basic configuration approach applies to any Unix/Linux installation.
Some Background
NTP runs on UDP port 123 so you should ensure that this port is unblocked on your server’s firewall. NTP servers advertise their presence every 64 seconds by means of a multicast address [...]]]></description>
			<content:encoded><![CDATA[<p>These notes were based on work done with Solaris 10 but I think the basic configuration approach applies to any Unix/Linux installation.</p>
<p><strong>Some Background</strong><br />
NTP runs on UDP port 123 so you should ensure that this port is unblocked on your server’s firewall. NTP servers advertise their presence every 64 seconds by means of a multicast address 224.0.1.1. An ntp client that is not configured with the unicast address of an NTP server multicasts when its xntpd (or ntpd) process starts and then sends request packets to the unicast address of all the ntp servers it can locate.  The request packet contains the client’s UTC time; when the ntp server responds it places it’s utc time in the reply.</p>
<blockquote><p><strong>Which Stratum?</strong><br />
NTP servers are organised into a hierarchy of levels called stratum.</p>
<p><em><strong>Stratum 1</strong></em> is the highest level. Servers on this level are usually interfaced directly to highly accurate time sources such as atomic clocks. These servers are not usually used for direct time sync, instead lower level servers are used.</p>
<p><em><strong>Stratum 2</strong></em> servers usually belong to large institutions such as universities and large commercial organisations. Servers in this stratum can be used directly for time sync (check the servers usage policies or use one of the ntp pool time servers) but large organisations usually have their own in house ntp server which will sync off a stratum 2 server and then provide time information to all inhouse systems.</p>
<p>Below stratum 2, some organisations will have their own time sources such as specialist time servers that sync of the time signal used by GPS satellites.</p></blockquote>
<blockquote><p><strong>Some Jargon</strong></p>
<ul>
<li><strong>Strata</strong> NTP servers are arranged in a hierarchy called strata. A stratum-1 server is more accurate than a stratum-2 server etc. Although there are 15 strata only the first 3 are normally used.</li>
<li><strong>Drift</strong> A drift file usually the frequency offset of the local system’s clock oscillator. Drift file contents can be used by protocols, like NTP, to cause a system’s clock to be more accurate.</li>
<li><strong>xntpd</strong> The SUN NTP daemon. Other OSes may use ntpd as their ntp daemon. Depending on which Linux you use you may have either xntpd or ntpd as your ntp daemon.</li>
<li><strong>ntp.conf</strong> The ntpd configuration file that controls the behaviour of the ntp daemon. For Solaris this is usually found in /etc/inet, for Linux this is usually found in /etc.</li>
<li><strong>fudge</strong> You can use the fudge utility in the ntp.conf file as a keyword to configure reference clocks in special ways. These notes do not delve into fudge to any extent.</li>
</ul>
</blockquote>
<p><strong>Configuration</strong><br />
On Solaris Sun provide a template ntp configuration file, /etc/inet/ntp.server, that you should copy to /etc/inet/ntp.conf and then customize to obtain the configuration for your network.</p>
<p>Edit your new ntp.conf</p>
<p><code>#  vi /etc/inet/ntp.conf</code></p>
<p>Ensure that the following line exists in your ntp.conf:<br />
<code>broadcast 224.0.1.1 ttl 4</code></p>
<p>Replace<br />
<code>server 127.127.XType.0<br />
fudge 127.127.XType.0 stratum 0</code></p>
<p>with<br />
<code>server 0.pool.ntp.org<br />
server 1.pool.ntp.org<br />
server 2.pool.ntp.org<br />
#fudge 127.127.XType.0 stratum 0</code></p>
<p>Make sure the drift file exists<br />
<code>#  touch /var/ntp/ntp.drift</code></p>
<p>Make sure the stats file exists<br />
<code>#  touch /var/ntp/ntpstats</code></p>
<p>Note, if you have different names/locations for your drift and stats files then use those instead of the examples above.</p>
<p>Make an initial sync of your server’s clock:<br />
<code>#  ntpdate 0.pool.ntp.org</code></p>
<p>Start the ntp daemon:<br />
<code>#  svcadm online ntp</code></p>
<p>Issuing the command<br />
<code>#  svcs -a | grep ntp</code></p>
<p>should now show something like<br />
<code>#  online	9:12:22 svc:/network/ntp:default</code></p>
<p>Your ntp daemon is now running. The ntpq command should show you the status of your ntp daemon’s synchronisation:</p>
<p><code><br />
#  ntpq -p<br />
remote           refid      st t when poll reach   delay   offset    disp<br />
==============================================================================<br />
NTP.MCAST.NET   0.0.0.0         16 u    -   64    0     0.00    0.000 16000.0<br />
-cachens2.onqnet clock.via.net    2 u  792 1024  377    39.15    4.198    0.92<br />
+203-80-163-174- ntp1.tpgi.com.a  3 u  954 1024  377    26.14   -2.018    0.82<br />
+ntp.tourism.wa. csiro-nml.physi  2 u  852 1024  377   106.00   -3.111    1.60<br />
*ns.tti.net.au   ntp.melbourne.n  2 u  805 1024  377    30.79    0.522    1.14<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://blogwords.neologix.net/neils/?feed=rss2&amp;p=19</wfw:commentRss>
		</item>
		<item>
		<title>Setting Timezone in Solaris 10</title>
		<link>http://blogwords.neologix.net/neils/?p=18</link>
		<comments>http://blogwords.neologix.net/neils/?p=18#comments</comments>
		<pubDate>Mon, 13 Apr 2009 01:30:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[IT Stuff]]></category>

		<category><![CDATA[Solaris]]></category>

		<category><![CDATA[Timezone]]></category>

		<category><![CDATA[TZ]]></category>

		<category><![CDATA[zoneinfo]]></category>

		<guid isPermaLink="false">http://blogwords.neologix.net/neils/?p=18</guid>
		<description><![CDATA[Internally Solaris 10 uses UTC but for programmes that need local timezone information the system timezone is set in the file /etc/default/init (Note: The file /etc/TIMEZONE is a symlink to /etc/default/init).
To set the timezone in /etc/default/init you edit the TZ variable so that, for example:
TZ="Australia/Canberra"
The full list of timezones is in /usr/share/lib/zoneinfo/
After changing the timezone [...]]]></description>
			<content:encoded><![CDATA[<p>Internally Solaris 10 uses UTC but for programmes that need local timezone information the system timezone is set in the file /etc/default/init (Note: The file /etc/TIMEZONE is a symlink to /etc/default/init).</p>
<p>To set the timezone in /etc/default/init you edit the TZ variable so that, for example:</p>
<p><code>TZ="Australia/Canberra"</code></p>
<p>The full list of timezones is in /usr/share/lib/zoneinfo/</p>
<p>After changing the timezone you should restart the system.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogwords.neologix.net/neils/?feed=rss2&amp;p=18</wfw:commentRss>
		</item>
		<item>
		<title>Force Synchronous Network Startup for MS WinXP</title>
		<link>http://blogwords.neologix.net/neils/?p=17</link>
		<comments>http://blogwords.neologix.net/neils/?p=17#comments</comments>
		<pubDate>Wed, 22 Oct 2008 09:37:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[IT Stuff]]></category>

		<category><![CDATA[Windows]]></category>

		<category><![CDATA[fast network startup]]></category>

		<category><![CDATA[microsoft]]></category>

		<category><![CDATA[ms win xp]]></category>

		<category><![CDATA[network]]></category>

		<category><![CDATA[network startup]]></category>

		<category><![CDATA[registry]]></category>

		<category><![CDATA[startup]]></category>

		<category><![CDATA[SyncForegroundPolicy]]></category>

		<category><![CDATA[xp]]></category>

		<guid isPermaLink="false">http://blogwords.neologix.net/neils/?p=17</guid>
		<description><![CDATA[One problem I&#8217;ve been having recently with MS WinXP workstations connecting and authenticating to a Samba PDC is that the workstation cannot authenticate to the PDC and download the roaming profile (it uses the local cached copy of the profile instead). The problem seems to be occurring quite frequently with a new generation of &#8220;power [...]]]></description>
			<content:encoded><![CDATA[<p>One problem I&#8217;ve been having recently with MS WinXP workstations connecting and authenticating to a Samba PDC is that the workstation cannot authenticate to the PDC and download the roaming profile (it uses the local cached copy of the profile instead). The problem seems to be occurring quite frequently with a new generation of &#8220;power efficient&#8221; workstations from several different brand name manufacturers although I did have experience of this with some workstations a couple of years ago.</p>
<p>What seems to happen is that the network does not startup before the Ctrl+Alt+Del and login dialog appears. If the workstation is left for about 5-10 minutes the problem usually goes away. Occasionally though the problem becomes so persistent that no matter how often you reboot and regardless of how long you wait the PDC remains uncontactable. The problem is intermittent and inconsistent, for some workstations it will always happen, for others it only appears sporadically.</p>
<p>How to get around it? I&#8217;ve found that forcing windows to start its networking synchronously during the initial workstation startup seems to fix the problem. Making this happen requires a change to registry settings so save the following with a filename of &lt;somefile&gt;.reg &#8230;</p>
<blockquote><p><code>Windows Registry Editor Version 5.00</code></p>
<p><code>[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\CurrentVersion\Winlogon]<br />
&#8220;SyncForegroundPolicy&#8221;=dword:00000001</code></p>
<p><code>[HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Winlogon]<br />
&#8220;SyncForegroundPolicy&#8221;=dword:00000001</code></p></blockquote>
<p>According the docs  at Microsoft&#8217;s Technet site setting this value to dword 1 causes the operating system to &#8220;Always wait for the network at computer startup and logon.&#8221; Why two different registry settings? Microsoft&#8217;s docs say that the first entry in the Policies section of the registry is all that is needed but when inspecting a workstation registry one day I found this actual attribute (with a setting of dword 0) in the second branch of the registry &#8230; &#8220;so to be sure, to be sure&#8221; I&#8217;ve added it in both locations.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogwords.neologix.net/neils/?feed=rss2&amp;p=17</wfw:commentRss>
		</item>
		<item>
		<title>A new slant on generating electricity from wind power</title>
		<link>http://blogwords.neologix.net/neils/?p=16</link>
		<comments>http://blogwords.neologix.net/neils/?p=16#comments</comments>
		<pubDate>Wed, 22 Oct 2008 09:05:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
		
		<category><![CDATA[Renewable Energy]]></category>

		<category><![CDATA[electricity]]></category>

		<category><![CDATA[electricity generation]]></category>

		<category><![CDATA[wind]]></category>

		<category><![CDATA[wind electicity generation]]></category>

		<category><![CDATA[wind power]]></category>

		<category><![CDATA[windbelts]]></category>

		<guid isPermaLink="false">http://blogwords.neologix.net/neils/?p=16</guid>
		<description><![CDATA[I&#8217;ve been looking at options for more compact (read unobtrusive) setups for generating electricity from wind power and came across this interesting article on Windbelts. They also include some documentation as well as details on how to build an experimental version of a Windbelt :=)
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been looking at options for more compact (read unobtrusive) setups for generating electricity from wind power and came across this interesting article on <a title="Windbelts" href="http://www.humdingerwind.com" target="_blank">Windbelts</a>. They also include some documentation as well as details on how to build an experimental version of a Windbelt :=)</p>
]]></content:encoded>
			<wfw:commentRss>http://blogwords.neologix.net/neils/?feed=rss2&amp;p=16</wfw:commentRss>
		</item>
	</channel>
</rss>
