<?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>SQUARISM &#187; Noteworthy</title>
	<atom:link href="http://squarism.com/category/noteworthy/feed/" rel="self" type="application/rss+xml" />
	<link>http://squarism.com</link>
	<description>addicted to pixels</description>
	<lastBuildDate>Tue, 20 Jul 2010 15:12:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>iPhoneDevCampDC 2009</title>
		<link>http://squarism.com/2009/08/11/iphonedevcampdc-2009/</link>
		<comments>http://squarism.com/2009/08/11/iphonedevcampdc-2009/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 03:32:53 +0000</pubDate>
		<dc:creator>Dillon</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Noteworthy]]></category>

		<guid isPermaLink="false">http://squarism.com/?p=254</guid>
		<description><![CDATA[Went to the first annual iPhone Dev Camp here in DC. It was a barcamp style event over two days. It was very enjoyable although there were quite a few heavy hitters there (I wasn't one of them). There were a few different types of people there and I was one of the ones who [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://squarism.com/wp-content/uploads/2009/08/iphonedevdc.jpg" alt="iphonedevdc" title="iphonedevdc" width="604" height="237" class="aligncenter size-full wp-image-256" /><br />
Went to the first annual iPhone Dev Camp here in DC.  It was a barcamp style event over two days.  It was very enjoyable although there were quite a few heavy hitters there (I wasn't one of them).  There were a few different types of people there and I was one of the ones who doesn't have anything on the app store and isn't making any money off iPhone dev.  A few people there had apps I knew from the press as well as an author (Dave Mark -- who was great) that I've read quite a bit from.</p>
<p>What follows is some of the notes that I took at the conference.  It's by no means a transcription.</p>
<h2>Peter Corbett - Apps for Democracy</h2>
<p>@corbet3000<br />
He met with Vivek Kundra (CTO/fed CIO DC) and started a dontest for DC, open data.  Citizens created "fix my city" type apps.  43 webapps created, $2.3 EST value, $50k cost, 5000% roi.  Huge success.</p>
<p>A few examples:</p>
<ul>
<li>areyousafedc iphone app - a tachometer as you walk, green = safe, red = danger.  Pulls data from open city sources, crime reports etc.  Very simple interface, pretty cool</li>
<li>wethepeoplewiki.com - structured wiki, real-time crime data.  I didn't get this.</li>
<li>park it dc - very cool parking meter app.  People report broken meters, displays broken meters on a google map mashup.  City found their contractors were fixing their meters in avg of 7 days but their SLA was 24 hours.  Broken meters not cities fault, app helped DC discover the real problem.</li>
<li>iPhone demo at DC311 - http://victorshillo.com/dc311/2/</li>
</ul>
<p>Really good presentation.  Peter is a cool guy.  Nice, technical and well connected.  Peter did another awesome presentation called <a href="http://www.youtube.com/watch?v=wZI2_fHFJ2s">No one cares about your crappy webapp</a> at an Ignite Baltimore conference.  I tried to tell him how awesome that was but it's hard to put into words.</p>
<h2>Jonathan Blocksom - OpenGL</h2>
<p>@jblocksom</p>
<p>http://www.gollygee.com/weblogs/jblocksom</p>
<p>Jonathan works at google.  He had an android shirt on.  It was pretty funny.  I seriously think he was there to convert some people.  :P  He was really nice and I enjoyed talking to him about gamedev (even if most of my stuff has been in Java).  He did a really nice overview of OpenGL, computer graphics and his game Bubbles.  His game has been on the app store since the beginning of the app store opening.</p>
<ul>
<li>Z buffering is checking if a pixel is behind another, won't render.</li>
<li>Use the iPhone boilerplate template to learn</li>
<li>Overview of the various buffers that the template creates.</li>
<li>You can use the bullet SDK, collada to import 3d models etc</li>
<li>You can use the Texture2D class to easily import textures from the apple Lunar lander sample code</li>
<li>You can use the touch fighter sample code.  It shows how to  overlay a high score list over opengl view</li>
<li>Don't mix OpenGL and cocoa views together for performance reasons</li>
<li>He gave an overview of his sales history which was interesting.</li>
</ul>
<p>A lot of people showed their sales tapering off after an initial burst of sales.  Sometimes press coverage or even competing apps would create another bust of sales.</p>
<h2>Leon Palm - Computer Vision</h2>
<p>Leon also works at Google (not that anyone is judging people based on their day job.  Hey, google is a cool company (currently).  He was a really smart and nice guy.  Easy to talk to.  Had a cool Sudoku solver app to demo.  I thought I had seen his app covered in the press but that turned out to be a competing one (oops!).  His presentation walked through how the app works.  Some parts are super confusing and hard but he did a good job in breaking it down.</p>
<p>How his app works:</p>
<ul>
<li>Evolution algorithm</li>
<li>RANSAC to find the line</li>
<li>Walk the intersection of the lines</li>
<li>Find 8x8 inliers in checkers, 7x8 in connect four</li>
<li>Have lines, apply transform matrix to rectify image</li>
<li>Get pieces is easy</li>
<li>Sample region at expected center, create int array for piece config</li>
<li>Use open source solver etc</li>
</ul>
<p>Drawing the results back.<br />
We have: piece colors, positions, sizes and warp matrix.  Derectify image and draw over solution.</p>
<p>Conclusion: easy to do if task is broken down.  Use existing knowledge (whitepapers).  Filtering/tweaking is the most important part.  You have to tweak it to work with cameras lighting and make it accurate.  He said tweaking and adjusting took the most time.  I believe it.</p>
<p>I have done some test type stuff with OpenCV but Leon had really taken this all the way to the finish line.  It was a really in-depth talk that was academically the most complicated of all the talks.</p>
<h2>Kiril - Working w Designers from Imagini Studios</h2>
<p>Kiril is the artist that worked on Harbor Master.  It's a "line drawing" game similar to Flight Control.  Apparently it's doing very well on the app store.  These guys were super pro.  They had a great presentation, super personalities and they had found success being an indie game dev shop.  I was really green but then I hadn't put in the hours etc.</p>
<p>Kiril talked about his mock ups, how he worked with the developers (2 of them) and showed his different iterative art pieces.  He mentioned <a href="http://ffffound.com/">ffffound</a> for art inspiration.  And his most important advice to developers: <em>don't think that mockups are the final product.</em>  He said many people can't make the jump from concept to final product.</p>
<h2>Christopher Brown - App Store Data!</h2>
<p>Christopher runs an analytics company called Tap Metrics.  They had a super slick web app that scrapes data from the app store (I imagine only a few people can do this).  He had run many reports and shared some interesting trends:</p>
<ul>
<li>Most people that buy an app stay in that category and buy again</li>
<li>94% of apps are in English, meaning German/English counts.  Germany only counts wouldn't count.  All -> EN -> DE, FR, JP</li>
<li>1% conversion freemium rate free->pro.  Meaning 1M free downloads.<br />
1.99 better segment, .99 is saturated
</ul>
<p>If I was on the store, I'd talk to Chris about metrics.  I can't imagine anyone else having something similar in polish.  I hope he gets some traction (if he hasn't already) on his work.  It was impressive.</p>
<h2>Dave Smith - Audio on the iPhone</h2>
<p>Dave had a presentation that I really enjoyed having worked with various audio APIs.  I asked the most questions on this one.  He walked through his audiobook app (which was really neat).  He was friendly to talk to (for further notice ... everyone was nice).  He gave a good overview of real code and a real working audiobook app he works on.  The app displays the text version of the audiobook while it plays and stays in sync.  It's very polished.</p>
<p>Some random notes (I wrote as fast as I could):</p>
<ul>
<li>AVAudioPlayer level above openAL</li>
<li>mp3 format is hw decompression, good for batt/performance</li>
<li>To get started, add AVFoundation, AudioToolbox frameworks to project</li>
<li>Make a pointer: AVAudioPlayer* player</li>
<li>- (IBAction)play:(id)sender;  // methods for button actions etc</li>
<li>In interface builder, mapping actions using touchUpInside is the best option to capture user button push</li>
<li>Useful command line utility in OSX: /usr/bin/afconvert -iaf4 (convert aiff to compressed formats, pre-compress best for iphone optimization)</li>
<li>UInt32 category = kAudioSessionCategory_MediaPlayback  // kAudioSessionCategory_* has many diff options</li>
</ul>
<p>He always released his memory correctly.  :)<br />
<code>[player pause]<br />
[player release]<br />
player = nil // nice GC technique</code></p>
<p>His start method created the player and played at the same time.  Pause destroyed it.  This might seem odd but he said, "don't keep player instances around for a long time, non deterministic things can start happening."</p>
<h2>Sze Wong - $1M app</h2>
<p>Sze asked the question "what would a $1M iphone app look like?".  He also talked about enterprise development and asked if the iPhone could be a serious contender.  He has a metric ton of experience doing enterprise and mobile development.  He seems to like the iPhone (hey a lot of us are sick of doing J2EE) as a refreshing platform.</p>
<p>Sze had a really nice presentation that didn't materialize for me until he showed his demo.  I can only describe it as Oracle Forms for the iPhone.  He has a slick web ui that can generate custom forms for many different uses.  His forms could even include a signature box that the iPhone can use to create a UPS type delivery board.  It was pretty compelling and he had a lot of nice backend stuff (like JSON, RSS, XLS exporters) created in the web ui.</p>
<h2>Other topics</h2>
<p>Things wound down and at the end they had a panel of the experts there give answers to various questions by Dave Mark.  It was really neat to see an improvised conference.</p>
<ul>
<li>A lot of people mentioned the importance of Touch Arcade.</li>
<li>Someone mentioned nsfetchrequest for nstableviews?</li>
<li>Ad hoc distribution for beta testers?  I need to research that.</li>
<li>Imangi Studios mentioned getsatisfaction, a customer support portal to outsource support</li>
</ul>
<p>Fun conference.  I hope to see them next year or sooner.  I think ruby dcamp is next for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://squarism.com/2009/08/11/iphonedevcampdc-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making Tetris</title>
		<link>http://squarism.com/2009/06/22/making-tetris/</link>
		<comments>http://squarism.com/2009/06/22/making-tetris/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 21:01:23 +0000</pubDate>
		<dc:creator>Dillon</dc:creator>
				<category><![CDATA[GameDev]]></category>
		<category><![CDATA[Noteworthy]]></category>
		<category><![CDATA[Processing]]></category>

		<guid isPermaLink="false">http://squarism.com/?p=153</guid>
		<description><![CDATA[Backstory In my last job, I was a hourly contractor who had finished a project and was transitioning off to other things. By a chance of fortune, I had an opportunity to take some time off and do whatever. I had one week on, one week off for a period of over a month. I [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://squarism.com/wp-content/uploads/2009/04/tatris_03.png" alt="tatris_03" title="tatris_03" width="400" height="598" class="aligncenter size-full wp-image-235" /></p>
<h2>Backstory</h2>
<p>In my last job, I was a hourly contractor who had finished a project and was transitioning off to other things.  By a chance of fortune, I had an opportunity to take some time off and do whatever.  I had one week on, one week off for a period of over a month.  I was extremely excited because I have a lot of hobbies that are bound by time and this was exactly what I wanted.  Time to do whatever.  I was curious to see whether I'd waste it or actually produce something.  I'm happy to say that I did not waste the time I had and I produced the most intense gamedev learning experience I've ever had.  By no means, am I claiming to be an expert.  I'm just documenting a very large personal effort.</p>
<p>Ok, enough of all that personal crap.  In reading game development community sites (like gamedev.net and idevgames.com), something that was a near cosmological constant is the post "OMG I wnt to make mmo, pls halp!".  It's like a nuclear clock.  Someone does some subscription revenue math, gets excited with dreams of being rich, tries to start something ridiculously complicated, gets stuck and runs to a forum looking for members or advice.  On a forum like idevgames.com, there are exceptional members (who should be praised for their patience and humanity) that take the time to respond to this never-ending line of questioning.  The most effective response is, "have you made tetris yet?".  Usually the person has not made a simple game and I doubt that they end up doing so.  However, eventually this idea sunk in and I realized: <em>I do not want to make an MMO but I should make Tetris</em>.  Because someday I might want to make something more complicated (not an MMO).  So let's do this.</p>
<h2>The Plan</h2>
<p>Firstly, I had been doing Java at my job for a while now and am fairly comfortable with it.  Outside of this, I had been messing around with a project called <a href="http://processing.org">Processing</a> which makes graphics and generative art really easy.  I knew this was going to be complicated so instead of diving into code, I made a plan first.  I started breaking down what Tetris is and mapped out classes and responsibility.  This planning bit I've always been bad at and I spent maybe a day thinking and writing down like "what a tetris piece is" and what minimal features there should be.  The gameplay and design is already done and this fact is a big step compared to coming up with something by yourself.</p>
<p>For sure, the lesson I learned is: "it's just a plan".  You can change it as you go and eventually it's best to throw it away after things are sufficiently started.  As the code grew, the plan was put away; which is good because my plan wasn't really all that special or well organized.  I had some ideas about pieces to be written and what the hard parts were but honestly the best lesson I learned was "it's just a plan".  You're not going to pre-write and pre-solve all the problems.</p>
<p>Next was research and learning.  I studied other processing games (like <a href="http://lux.vu/blog/2005/01/06/monkey-patrol/">MonkeyPatrol</a> by Joshua Minor) and white papers from university CS classes.  I played Quinn (a mac OSX clone) a bit.  I knew a few things to start with.  For example, game objects should draw themselves.  There are 7 piece types (which look similar to the letters: I L O J S Z T) and many things are similar between them so I planned for a base Piece class and named the pieces after the letters they looked like (IPiece, LPiece, etc).  I collected some screenshots of existing games to use as inspiration.</p>
<h2>Drawing a Piece</h2>
<p>Ok, I had my plan and similar stuff done.  Ok, where to start?  I like to start from the top down.  IE: from the interface backwards.  So I start with a graphical mockup and then make the mockup actually function.  So started out with drawing.  First, I created a Block class.  This is a single square with an x,y,height,width,color etc.  It's a component of a Piece.  Before going any further.  I have to explain that I intentionally did not do Tetris the easy way.  The easy way is having a bitmap style grid of blocks and simply moving the bits down and around.  Then you just represent the bitmap with graphics.  I did not do it this way because I wanted an excuse to do sorta a "2d model" where the piece is constructed from a central point, rotated etc more like what someone would do with a 3d model in a modern game.  This single decision made things extremely complicated for me but it also made it a more useful learning experience for when I want to do something like a platformer or a shooter because these game types use collision detection in a 2d/3d space similar to how I did it.  So a Piece consists of Blocks with a model describing the shape of the Piece.  For example, an LPiece looks like this:</p>
<p><code>1<br />
2<br />
34</code></p>
<p>And the IPiece looks like this:<br />
<code>1<br />
2<br />
3<br />
4</code></p>
<p>And the OPiece looks like this:<br />
<code>12<br />
34</code></p>
<p>So I created all the Pieces and eventually had a test app that looked like this:<br />
<img src="http://squarism.com/wp-content/uploads/2009/04/tatris_block_test-189x300.png" alt="tatris_block_test" title="tatris_block_test" width="189" height="300" class="aligncenter size-medium wp-image-233" /></p>
<p>Next, let's move on to piece movement.</p>
<p><span id="more-153"></span></p>
]]></content:encoded>
			<wfw:commentRss>http://squarism.com/2009/06/22/making-tetris/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Animated Box</title>
		<link>http://squarism.com/2007/04/01/animated-box/</link>
		<comments>http://squarism.com/2007/04/01/animated-box/#comments</comments>
		<pubDate>Sun, 01 Apr 2007 16:11:29 +0000</pubDate>
		<dc:creator>Dillon</dc:creator>
				<category><![CDATA[C/C++]]></category>
		<category><![CDATA[GameDev]]></category>
		<category><![CDATA[Noteworthy]]></category>

		<guid isPermaLink="false">http://squarism.com/2007/04/01/animated-box/</guid>
		<description><![CDATA[I'm very, very early on in the effort of this graphics/game test. But essentially I wanted to write down where I'm at with Xcode, OpenGL and learning C++. Learning C++ by starting with OpenGL is very stupid. I admit this. It's the wrong way to start out. It's like learning how to walk by jumping [...]]]></description>
			<content:encoded><![CDATA[<p>I'm very, very early on in the effort of this graphics/game test.  But essentially I wanted to write down where I'm at with Xcode, OpenGL and learning C++.</p>
<p>Learning C++ by starting with OpenGL is very stupid.  I admit this.  It's the wrong way to start out.  It's like learning how to walk by jumping out of a Dodge Viper.  But I want to get beyond the Hello World books and after trying for two or three years in my limited spare time, I'm finding that being thrown into the fire is somewhat motivating.  I learned Java the same way (not that I'm a master of that either), I gave myself a goal that I really wanted to accomplish and the rest just fell into place because I couldn't think about anything else.</p>
<p>Such is my animated box.  I want to move a box in a really smart way.  Not just some Box.setX(i++); Box.setY(j++) in the main() method but something smarter that would enable me to move two, four or one-thousand boxes in the future.</p>
<p><a href="http://squarism.com/?pp_album=main&amp;pp_cat=gamedev&amp;pp_image=animated_box.gif" title="animated box"><img src="http://squarism.com/wp-content/photos/animated_box.gif" class="centered" alt="animated box" width="250" height="272" /></a> </p>
<p>More coming...</p>
<p><a href="http://squarism.com/?pp_album=main&amp;pp_cat=gamedev&amp;pp_image=xcode_glclearcolor.png" title="xcode glclearcolor"><img src="http://squarism.com/wp-content/photos/xcode_glclearcolor.png" class="centered" alt="xcode glclearcolor" width="411" height="550" /></a> </p>
]]></content:encoded>
			<wfw:commentRss>http://squarism.com/2007/04/01/animated-box/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Useful Crontab Header</title>
		<link>http://squarism.com/2004/11/12/useful-crontab-header/</link>
		<comments>http://squarism.com/2004/11/12/useful-crontab-header/#comments</comments>
		<pubDate>Fri, 12 Nov 2004 19:32:30 +0000</pubDate>
		<dc:creator>Dillon</dc:creator>
				<category><![CDATA[Noteworthy]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://squarism.com/2004/11/12/useful-crontab-header/</guid>
		<description><![CDATA[#minute (0-59), #&#124; hour (0-23), #&#124; &#124; day of the month (1-31), #&#124; &#124; &#124; month of the year (1-12), #&#124; &#124; &#124; &#124; day of the week (0-6 with 0=Sunday). #&#124; &#124; &#124; &#124; &#124; commands Good for putting at the top of crontab files.]]></description>
			<content:encoded><![CDATA[<pre>
#minute (0-59),
#|      hour (0-23),
#|      |       day of the month (1-31),
#|      |       |       month of the year (1-12),
#|      |       |       |       day of the week (0-6 with 0=Sunday).
#|      |       |       |       |       commands
</pre>
<p>Good for putting at the top of crontab files.</p>
]]></content:encoded>
			<wfw:commentRss>http://squarism.com/2004/11/12/useful-crontab-header/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>samba, winbind and solaris</title>
		<link>http://squarism.com/2004/10/01/samba-winbind-and-solaris/</link>
		<comments>http://squarism.com/2004/10/01/samba-winbind-and-solaris/#comments</comments>
		<pubDate>Fri, 01 Oct 2004 20:17:01 +0000</pubDate>
		<dc:creator>Dillon</dc:creator>
				<category><![CDATA[Noteworthy]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://squarism.com/2004/10/01/samba-winbind-and-solaris/</guid>
		<description><![CDATA[This is a repost for formatting Winbind-Solaris Documentation Naag Mummaneni getnag at rediffmail.com Thu May 2 11:10:54 GMT 2002 Next message: Winbind-Solaris Documentation Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] -------------------------------------------------------------------------------- Hi, I just configured my Solaris box to logon to my Windows 2k Domain after working [...]]]></description>
			<content:encoded><![CDATA[<p><font color="orange"><i>This is a repost for formatting</i></font></p>
<p>Winbind-Solaris Documentation<br />
Naag Mummaneni getnag at rediffmail.com<br />
Thu May 2 11:10:54 GMT 2002 </p>
<p>Next message: Winbind-Solaris Documentation<br />
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] </p>
<p>--------------------------------------------------------------------------------</p>
<p>Hi,</p>
<p>I just configured my Solaris box to logon to my Windows 2k Domain after working on it for three days.I am sorry to say that I have found no documentation for setting up Samba-winbind on solaris.And I feel that a Prestigious opensource project like Samba shouldnt be blamed for this.So I modified the documentation that come with samba &amp; prepared this one for "solaris" so that no other administrator will face problems that I did. I hope the Samba group will put this documentation part in the distribution.Please find the attached doc file for the documentation.</p>
<p>Thanks<br />
Naag Mummaneni(getnag at rediffmail.com)<br />
--------------------------------------------------------<br />
<span id="more-46"></span><br />
Installation and Configuration of Winbind on Solaris.</p>
<p>This HOWTO describes how to get winbind services up and running to control access and authenticate users on your Solaris box using the winbind services which come with SAMBA 2.2.x latest CVS Checkout.Make sure you are using the latest Samba 2.2.x cvs checkout as other versions come with a lots of bugs regarding winbind .And even the Latest Samba Stable Release is also not an exception to this.</p>
<p>Introduction<br />
This HOWTO describes the procedures used to get winbind up and running on a Solaris system.<br />
Winbind is capable of providing access and authentication control for Windows Domain users through an NT<br />
or Win2K PDC for 'regular' services, such as telnet and ftp, as well for SAMBA services.<br />
Why should I to this? ?h?n<br />
This allows the SAMBA administrator to rely on the authentication mechanisms on the NT/Win2K<br />
PDC for the authentication of domain members. NT/Win2K users no longer need to have separate<br />
accounts on the SAMBA server.<br />
Who should be reading this document? ?h?n<br />
This HOWTO is designed for system administrators. If you are implementing SAMBA on a file<br />
server and wish to (fairly easily) integrate existing NT/Win2K users from your PDC onto the<br />
SAMBA server, this HOWTO is for you. </p>
<p>Requirements<br />
If you have a samba configuration file that you are currently using... BACK IT UP! If your system already uses PAM, back up the /etc/pam.conf file ! If you haven't already made a boot disk, MAKEONE NOW!<br />
Messing with the pam configuration file can make it nearly impossible to log in to yourmachine. That's why you want to be able to boot back into your machine in single user mode and restore your /etc/pam.conf back<br />
to the original state they were in if you get frustrated with the way things are going. ;-)<br />
Please refer to the main SAMBA web page or, better yet, your closest SAMBA mirror site for<br />
instructions on downloading the source code of Samba 2.2.x from the SAMBA CVS repository.<br />
To allow Domain users the ability to access SAMBA shares and files, as well as potentially other services provided by your SAMBA machine, PAM (pluggable authentication modules) must be setup properly on your machine. In order to compile the winbind modules, you should have at least the pam libraries resident on your system. Solaris 7/8 has its pam modules coming with the distribution itself.</p>
<p>Testing Things Out<br />
Before starting, it is probably best to kill off all the SAMBA related daemons running on your server. Kill off<br />
all smbd, nmbd, and winbindd processes that may be running. </p>
<p>Configure and compile SAMBA<br />
The configuration and compilation of SAMBA is pretty straightforward. The first three steps may not be<br />
necessary depending upon whether or not you have previously built the Samba binaries.<br />
root# autoconf<br />
root# make clean<br />
root# rm config.cache<br />
root# ./configure --with-winbind --with-pam<br />
root# make<br />
root# make install</p>
<p>This will, by default, install SAMBA in /usr/local/samba. See the main SAMBA documentation if you<br />
want to install SAMBA somewhere else. It will also build the winbindd executable and libraries.</p>
<p>Configure nsswitch.conf and the winbind libraries<br />
The libraries needed to run the winbindd daemon through nsswitch need to be copied to their proper<br />
locations, so<br />
root# cp ../samba/source/nsswitch/libnss_winbind.so /usr/lib<br />
I also found it necessary to make the following symbolic links:<br />
root# ln -s /usr/lib/libnss_winbind.so /usr/lib/libnss_winbind.so.1<br />
root# ln -s /usr/lib/libnss_winbind.so /usr/lib/libnss_winbind.so.2<br />
root# ln -s /usr/lib/libnss_winbind.so /usr/lib/nss_winbind.so.1<br />
root# ln -s /usr/lib/libnss_winbind.so /usr/lib/nss_winbind.so.2</p>
<p>Now, as root you need to edit /etc/nsswitch.conf to allow user and group entries to be visible from the winbindd daemon. My /etc/nsswitch.conf file look like this after editing:<br />
passwd: files winbind<br />
group: files winbind</p>
<p>Configure smb.conf<br />
Several parameters are needed in the smb.conf file to control the behavior of winbindd. Configure smb.conf These are described in more detail in the winbindd(8) man page. My smb.conf file was modified to include the following entries in the [global] section:<br />
[global]</p>
<p># The previous documentation says to as the "winbind seperator " #directive also but it is no longer supported.<br />
# use uids from 10000 to 20000 for domain users<br />
winbind uid = 10000-20000<br />
# use gids from 10000 to 20000 for domain groups<br />
winbind gid = 10000-20000<br />
# allow enumeration of winbind users and groups<br />
winbind enum users = yes<br />
winbind enum groups = yes<br />
# give winbind users a real shell (only needed if they have telnet access)<br />
template homedir = /home/winnt/%D/%U<br />
template shell = /bin/bash</p>
<p>Join the SAMBA server to the PDC domain<br />
Enter the following command to make the SAMBA server join the PDC domain, where DOMAIN is the name<br />
of your Windows domain and Administrator is a domain user who has administrative privileges in the<br />
domain.<br />
root# /usr/local/samba/bin/smbpasswd -j DOMAIN -r PDC -U Administrator<br />
The proper response to the command should be: "Joined the domain DOMAIN" where DOMAIN is your<br />
DOMAIN name.</p>
<p>Start up the winbindd daemon and test it!<br />
Eventually, you will want to modify your smb startup script to automatically invoke the winbindd daemon<br />
when the other parts of SAMBA start, but it is possible to test out just the winbind portion first. To start up<br />
winbind services, enter the following command as root:<br />
root# /usr/local/samba/bin/winbindd<br />
I'm always paranoid and like to make sure the daemon is really running...<br />
root# ps -ae | grep winbindd<br />
This command should produce output like this, if the daemon is running<br />
3025 ? 00:00:00 winbindd<br />
Now... for the real test, try to get some information about the users on your PDC<br />
root# /usr/local/samba/bin/wbinfo -u<br />
This should echo back a list of users on your Windows users on your PDC. For example, I get the following<br />
response:<br />
CEO\Administrator<br />
CEO\burdell<br />
CEO\Guest<br />
CEO\jt-ad<br />
CEO\krbtgt<br />
CEO\TsInternetUser</p>
<p>root# /usr/local/samba/bin/wbinfo -g<br />
CEO\Domain Admins<br />
CEO\Domain Users<br />
CEO\Domain Guests<br />
CEO\Domain Computers<br />
CEO\Domain Controllers<br />
CEO\Cert Publishers<br />
CEO\Schema Admins<br />
CEO\Enterprise Admins<br />
CEO\Group Policy Creator Owners<br />
The function 'getent' can now be used to get unified lists of both local and PDC users and groups. Try the<br />
following command:<br />
root# getent passwd<br />
You should get a list that looks like your /etc/passwd list followed by the domain users with their new<br />
uids, gids, home directories and default shells.<br />
The same thing can be done for groups with the command<br />
root# getent group</p>
<p>Fix the /etc/rc.d/init.d/samba.server startup files<br />
The winbindd daemon needs to start up after the smbd and nmbd daemons are running. To accomplish this<br />
task, you need to modify the /etc/init.d/samba.server script to add commands to invoke this daemon in the<br />
proper sequence. My /etc/init.d/samba.server file starts up smbd, nmbd, and winbindd from the<br />
/usr/local/samba/bin directory directly.<br />
samba.server<br />
if [ ! -d /usr/bin ]<br />
then                    # /usr not mounted<br />
        exit<br />
fi</p>
<p>killproc() {            # kill the named process(es)<br />
        pid=`/usr/bin/ps -e |<br />
             /usr/bin/grep -w $1 |<br />
             /usr/bin/sed -e 's/^  *//' -e 's/ .*//'`<br />
        [ "$pid" != "" ] &amp;&amp; kill $pid<br />
}</p>
<p># Start/stop processes required for samba server</p>
<p>case "$1" in</p>
<p>'start')<br />
#<br />
# Edit these lines to suit your installation (paths, workgroup, host)<br />
#<br />
echo Starting SMBD<br />
   /usr/local/samba/bin/smbd -D<br />
#-s /usr/local/samba/smb.conf<br />
echo Starting NMBD<br />
   /usr/local/samba/bin/nmbd -D<br />
#-l /usr/local/samba/var/log -s /usr/local/samba/smb.conf<br />
echo Starting Winbind Daemon<br />
/usr/local/samba/bin/winbindd<br />
   ;;<br />
'stop')<br />
   killproc nmbd<br />
   killproc smbd<br />
   killproc winbindd<br />
   ;;<br />
*)<br />
   echo "Usage: /etc/init.d/samba.server { start | stop }"<br />
   ;;<br />
esac</p>
<p>If you restart the smbd, nmbd, and winbindd daemons at this point, you should be able to connect to the<br />
samba server as a domain member just as if you were a local user.</p>
<p>Configure Winbind and PAM<br />
If you have made it this far, you know that winbindd and samba are working together. If you want to use<br />
winbind to provide authentication for other services, keep reading. The pam configuration file need to be altered in this step. (Did you remember to make backups of your original /etc/pam.conf file? If not, do it now.)<br />
You will need a pam module to use winbindd with these other services. This module will be compiled in the ../source/nsswitch directory by default when we used<br />
 ./configure --with-pam option.<br />
root# make nsswitch/pam_winbind.so<br />
from the ../source directory. The pam_winbind.so file should be copied to the location of your other<br />
pam security modules. On my Solaris 8, this was the /usr/lib/security directory.<br />
root# cp ../samba/source/nsswitch/pam_winbind.so /usr/lib/security</p>
<p>The /etc/pam.conf need to be changed. I changed this file so that my Domain users can logon both locally as well as telnet.The following are the changes that I made.You can customize the pam.conf file as per your requirements,but be sure of those changes because in the worst case it will leave your system nearly impossible to boot.</p>
<p>#<br />
#ident	"@(#)pam.conf	1.14	99/09/16 SMI"<br />
#<br />
# Copyright (c) 1996-1999, Sun Microsystems, Inc.<br />
# All Rights Reserved.<br />
#<br />
# PAM configuration<br />
#<br />
# Authentication management<br />
#<br />
login   auth required   /usr/lib/security/pam_winbind.so<br />
login	auth required 	/usr/lib/security/$ISA/pam_unix.so.1 try_first_pass<br />
login	auth required 	/usr/lib/security/$ISA/pam_dial_auth.so.1 try_first_pass<br />
#<br />
rlogin  auth sufficient /usr/lib/security/pam_winbind.so<br />
rlogin  auth sufficient /usr/lib/security/$ISA/pam_rhosts_auth.so.1<br />
rlogin	auth required 	/usr/lib/security/$ISA/pam_unix.so.1 try_first_pass<br />
#<br />
dtlogin auth sufficient /usr/lib/security/pam_winbind.so<br />
dtlogin	auth required 	/usr/lib/security/$ISA/pam_unix.so.1 try_first_pass<br />
#<br />
rsh	auth required	/usr/lib/security/$ISA/pam_rhosts_auth.so.1<br />
other   auth sufficient /usr/lib/security/pam_winbind.so<br />
other	auth required	/usr/lib/security/$ISA/pam_unix.so.1 try_first_pass<br />
#<br />
# Account management<br />
#<br />
login   account sufficient      /usr/lib/security/pam_winbind.so<br />
login	account requisite	/usr/lib/security/$ISA/pam_roles.so.1<br />
login	account required	/usr/lib/security/$ISA/pam_unix.so.1<br />
#<br />
dtlogin account sufficient      /usr/lib/security/pam_winbind.so<br />
dtlogin	account requisite	/usr/lib/security/$ISA/pam_roles.so.1<br />
dtlogin	account required	/usr/lib/security/$ISA/pam_unix.so.1<br />
#<br />
other   account sufficient      /usr/lib/security/pam_winbind.so<br />
other	account requisite	/usr/lib/security/$ISA/pam_roles.so.1<br />
other	account required	/usr/lib/security/$ISA/pam_unix.so.1<br />
#<br />
# Session management<br />
#<br />
other	session required	/usr/lib/security/$ISA/pam_unix.so.1<br />
#<br />
# Password management<br />
#<br />
#other   password sufficient     /usr/lib/security/pam_winbind.so<br />
other	password required	/usr/lib/security/$ISA/pam_unix.so.1<br />
dtsession auth required	/usr/lib/security/$ISA/pam_unix.so.1<br />
#<br />
# Support for Kerberos V5 authentication (uncomment to use Kerberos)<br />
#<br />
#rlogin	auth optional	/usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass<br />
#login	auth optional	/usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass<br />
#dtlogin	auth optional	/usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass<br />
#other	auth optional	/usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass<br />
#dtlogin	account optional /usr/lib/security/$ISA/pam_krb5.so.1<br />
#other	account optional /usr/lib/security/$ISA/pam_krb5.so.1<br />
#other	session optional /usr/lib/security/$ISA/pam_krb5.so.1<br />
#other	password optional /usr/lib/security/$ISA/pam_krb5.so.1 try_first_pass</p>
<p>I also added a try_first_pass line after the winbind.so line to get rid of annoying double<br />
prompts for passwords.</p>
<p>Now restart your Samba &amp; try connecting through your  application that you configured in the pam.conf.</p>
<p>_________________________________________________________<br />
Click below to visit monsterindia.com and review jobs in India or Abroad</p>
<p>http://monsterindia.rediff.com/jobs</p>
<p>--------------------------------------------------------------------------------</p>
<p>Next message: Winbind-Solaris Documentation<br />
Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] </p>
<p>--------------------------------------------------------------------------------<br />
More information about the samba-docs mailing list</p>
]]></content:encoded>
			<wfw:commentRss>http://squarism.com/2004/10/01/samba-winbind-and-solaris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10 Friggin Useful Linux Tips</title>
		<link>http://squarism.com/2003/04/09/10-friggin-useful-linux-tips/</link>
		<comments>http://squarism.com/2003/04/09/10-friggin-useful-linux-tips/#comments</comments>
		<pubDate>Wed, 09 Apr 2003 18:09:10 +0000</pubDate>
		<dc:creator>Dillon</dc:creator>
				<category><![CDATA[Noteworthy]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://squarism.com/2003/04/09/10-friggin-useful-linux-tips/</guid>
		<description><![CDATA[A friggin run through 10 really friggin useful friggin Linux tips. These tips are quick and dirty. I encourage everyone to try to learn the mechanics behind these "just do it" instructions. 1. Filename completion in Bash This may be an obvious one to some, but bear with me. By far the most useful thing [...]]]></description>
			<content:encoded><![CDATA[<p>A friggin run through 10 really friggin useful friggin Linux tips.<br />
<span id="more-20"></span></p>
<p>
These tips are quick and dirty.  I encourage everyone to try to learn the mechanics behind these "just do it" instructions.
</p>
<h4>1. Filename completion in Bash</h4>
<p>
This may be an obvious one to some, but bear with me.  By far the most useful thing is speed and quickness on the command line.  Bash makes the shell quick and easy to use.  You can find commands that you didn't know about with command completion.  You can complete long filenames without having to type the whole thing.
</p>
<p>
The tab key, [tab], is the filename and command completion key.  You can hit [tab] to complete directory names, filenames and even commands that are in your $PATH environment variable.  [tab] can be hit twice to list files, directories and commands matching your input thus far.  For example, let's say we have three commands: show, shift and set.  If I type "s, [tab]", nothing happens because "s" is the 1st letter in all three commands.  "s" is not unique.  However, I can type "s, [tab], [tab]" to display all the commands that start with "s" (this would display all three).  If I type "sh, [tab], [tab]", then show and shift are displayed.
</p>
<p>
You get the idea.  The best way to learn more is to try it out for yourself.  Most Linux distros come with Bash, if you aren't sure what your current shell is, do a `echo $SHELL' to find out.  If you aren't running bash, just type `bash' to run bash.
</p>
<h4>2. Customizing your environment with profiles</h4>
<p>
There are many environment variables that you don't want to have to set manually everytime you log in.  You can set these variables automatically with profile scripts.  There are a few files that execute in a certain order:</p>
<ol>
<li>/etc/profile <i>system wide profile, maintained by root</i></li>
<li>.bash_profile</li>
<li>.bash_login <i>if .bash_profile is not found</i></li>
<li>.profile <i>if .bash_profile and .bash_login not found</i></li>
</ol>
<p>There's nothing special about /etc/profile except for two things: 1. every user picks it up when they log in  2. it's usally a root writable file only.  Typically, if more than one user uses a environment variable (like $JAVA_HOME) then you should throw it into /etc/profile.
</p>
<p>
So what kinds of things do you put in your profile?  Before we take a look at an example, remember that the profile gets executed in order.  If you are changing a default /etc/profile, typically you'll want to throw your own stuff at the bottom of the file.</p>
<pre>
# Ant/Java stuff
export PATH=$PATH:/usr/local/apache/bin:/usr/local/jakarta-ant-1.5/bin:/usr/java/j2sdk1.4.0/bin
export JAVA_HOME=/usr/java/j2sdk1.4.0
export CLASSPATH=.:/usr/java/castor:/usr/java/xerces/tools/xml-apis.jar:/usr/java/castor/castor-0.9.4.jar

MANPATH=$MANPATH:/usr/local/man
export MANPATH
</pre>
<p>Take a look at the PATH statement.  PATH has been defined earlier and I don't want to throw away its contents, so we include $PATH.  If we did PATH=/usr/local/bin, PATH would only be /usr/local/bin.  Seeing how there are many useful things in directories like /bin and /usr/bin, this would be bad.
</p>
<p>
A few other things, MANPATH holds the directories for man pages and colons separate directories and files in a list.  Also, if you want to read in a profile without having to log out and log back in, try: `. /etc/profile' or `source /etc/profile'.  You can substitute /etc/profile with "whatever" profile file.
</p>
<h4>3. Jobs and background processes</h4>
<p>
You can start up a background process by appending an ampersand.  You can view the background jobs with `jobs'.  You can bring a job back to the foreground with `fg [job number]' where [job number] is the number of the job.  Let's create a quick script and put it into the background:</p>
<pre>
echo 'while (true); do echo yay; sleep 1; done' &gt; yay.sh
</pre>
<p>Now we have a yay.sh script.  Let's make sure that is full of what we want.</p>
<pre>
[chris@server /tmp]$ cat yay.sh
while (true); do echo yay; sleep 1; done
</pre>
<p>Good.  Now let's run the script.</p>
<pre>
[chris@server /tmp]$ sh yay.sh
yay
yay
yay
...
</pre>
<p>So this is running and it's annoying us.  Hit [ctrl+z] to stop it and then type `bg 1' to put it into the background.  Note that it keeps outputing to the screen.  This is probably because `echo' writes to STDOUT which is what our terminal is on.  Normally, [ctrl+c] will send a break but since it's in the background, the [ctrl+c] doesn't work like you'd expect it to, it's tricking you.  Through the madness, type `fg 1'.  Now hit [ctrl+c].
</p>
<pre>
[chris@server /tmp]$ sh yay.sh
yay
yay

[1]+  Stopped                 sh yay.sh
[chris@server /tmp]$ bg 1
[1]+ sh yay.sh &amp;
[chris@server /tmp]$ yay
yay
yay
fgyay
 yay
1
sh yay.sh
yay
yay

[chris@server /tmp]$
</pre>
<p>One more thing on background jobs.  If a job is running in the background and you log out, the jobs is going to stop.  You can make a job persist in the background by starting it with the utility 'nohup'.  For example: `nohup ncftpget ftp://ftp.netscape.com/hugedownload.zip &amp;' would start the ncftpget program (a FTP downloader) with nohup in the background.  It'll run until we `kill' it, even if we log out.</p>
<h4>4. History expansion variables</h4>
<p>
Whether you use csh or bash, there are a few variables to make your life easier when trying to recall previous commands.
</p>
<p>
Let's say we are trying to create a directory called "/tmp/aDirectory/aSubDirectory/ohMyThisIsLong".  We create the directory and now we want go there quickly:</p>
<pre>
[chris@server /]$pwd
/
[chris@server chris]$ mkdir -p /tmp/aDirectory/aSubDirectory/ohMyThisIsLong
[chris@server chris]$ cd !:2
cd /tmp/aDirectory/aSubDirectory/ohMyThisIsLong
[chris@server ohMyThisIsLong]$ pwd
/tmp/aDirectory/aSubDirectory/ohMyThisIsLong
</pre>
<p>What is "!:2"?  ! calls the last command and :2 means "substitute the 3rd command parameter" (remember that the list starts with 0).  You can even print a history parameter with ":p":</p>
<pre>
[chris@server /]$ dog cat bird worm dirt
bash: dog: command not found
[chris@server /]$ !:1:p
cat
[chris@server /]$
</pre>
<p>You get the idea.  Again, the best way to learn is to try.
</p>
<h4>5. The fuser command</h4>
<p>
Let's say you can't figure out what's accessing a file or directory.  You need to kill the job, maybe you want to eject the CD, maybe you want to move the file ... Use fuser to view all the processes acessing a file or directory resource:
</p>
<pre>
fuser /mnt/cdrom
</pre>
<h4>6. Screen</h4>
<p>
I've written about screen before.  Can't preach enough about it.  So much better than nohup.  Run `screen' to start screen.  Hit [ctrl+a, ctrl+-] to open another virtual terminal, hit [ctrl+a, ctrl+c] to open a shell on that v-terminal.  Hit [ctrl+a, ctrl+d] to detach and run `screen -r' to reattach.  Very useful for logging in somewhere and keeping your sessions open when you go home or switch workstations.  For example:</p>
<ul>
<li>You could ssh to home, start a huge download, detach, drive home and reattach after your commute.</li>
<li>You can grab a text mode ICQ client and stay connected all the time whether you are logged in or not.</li>
<li>You can start a long compile job and log out without erasing any errors.</li>
<li>You don't have to set up your "One True Way" every time you log in.  For example, I like to have a browser in window #1, a shell in window #2 and something else in #3.  You'd just have to set this up once.</li>
<li>You can stay connected to IRC.</li>
</ul>
<h4>7. Text mode browsers</h4>
<p>
Can't get a GUI started up?  Try `links' or `lynx'.  Links does better frames, lynx can do HTTP authentication.  Get started with `links www.google.com' or `lynx www.google.com'.
</p>
<h4>8. RPMFind.net</h4>
<p>
The best place to grab missing RPMs is from <a href="http://www.rpmfind.net">RPMFind.net</a> hosted by the nice people at SpeakEasy (Speakeasy rocks as an ISP).  Let's say you're on your windows box and you want to install nethack (a famous rpg game).</p>
<ol>
<li>Open IE and goto www.rpmfind.net</li>
<li>Search for nethack</li>
<li>Find the rpm best matching your Linux distro</li>
<li>Right click on the rpm file itself and "Copy Link Location"</li>
<li>ssh into your linux box</li>
<li>Either download the rpm and install it later - `wget [paste]'</li>
<li>Or have rpm download it and install it in one motion - `rpm -ivh [paste]'</li>
</ol>
<p>Of course, if the rpm install fails, you have to download it again (like if you're missing the ncurses library for nethack).
</p>
<h4>9. Working with processes</h4>
<ul>
<li>
List all processes:</p>
<pre>ps aux</pre>
<li>
List all process matching 'String':</p>
<pre>ps aux | grep String</pre>
<li>
Monitor top CPU utilizing processes:</p>
<pre>top</pre>
<li>
Display what processes spawned what:</p>
<pre>pstree [process id]</pre>
<li>
Kill a process:</p>
<pre>kill [process id]</pre>
<li>
Kill a process with authority:</p>
<pre>kill -9 [process id]</pre>
<li>
Try to restart a process by sending it the SIGHUP signal.  (The program has to be coded to restart if it receives this signal):</p>
<pre>kill -HUP [process id]</pre>
<li>
Kill a process by its process name, for example: apache runs as httpd</p>
<pre>killall httpd</pre>
</ul>
<h4>10. Finding stuff</h4>
<p>
It's not easy finding files and folders.  UNIX is full of antiquated terms and abbreviations.  Someone asked me, "What does /etc stand for?".  It stands for 'et cetera'.  /etc is where people used to put miscellaneous files.  Now you typically find all the configuration files there.  How can you know all this?  Experience?
</p>
<p>
Nah.  Just use the `locate' command.  Like "locate httpd.conf" or "locate ssh".  Locate looks in a database for file info.  The database update typically runs as a cron job.  If you just copied a file 5 minutes ago, chances are that locate won't find it.  You can force a database update with `updatedb'.  Or...
</p>
<p>
You can use the `find' command.  Like `find / | grep httpd.conf' would search for httpd.conf starting at the root directory.</p>
]]></content:encoded>
			<wfw:commentRss>http://squarism.com/2003/04/09/10-friggin-useful-linux-tips/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
