<?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>totalnetsolutions.net &#187; Open Source Software</title>
	<atom:link href="http://www.totalnetsolutions.net/category/tech/oss/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.totalnetsolutions.net</link>
	<description>totalnetsolutions.net - Complete Networking Solutions for business</description>
	<lastBuildDate>Thu, 26 Jan 2012 04:05:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>What date is XX days from today?</title>
		<link>http://www.totalnetsolutions.net/2012/01/25/what-date-is-xx-days-from-today/</link>
		<comments>http://www.totalnetsolutions.net/2012/01/25/what-date-is-xx-days-from-today/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 03:30:27 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Open Source Software]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://www.totalnetsolutions.net/?p=89</guid>
		<description><![CDATA[A quick CLI reference for perl people&#8230; perl -e ' my @t=localtime(time() + $ARGV[0]*24*60*60); $t[4]++; $t[5]+=1900; print "$t[4]/$t[3]/$t[5]\n";' XX I&#8217;ve needed this 2x today already, and hope it helps you! Edit: Someone made a comment, as people on the internet are prone to do, so here&#8217;s the long-form non-one-liner version: #!/usr/bin/perl my $addDays = shift; [...]]]></description>
			<content:encoded><![CDATA[<p>A quick CLI reference for perl people&#8230;<br />
<code><br />
perl -e ' my @t=localtime(time() + $ARGV[0]*24*60*60); $t[4]++; $t[5]+=1900; print "$t[4]/$t[3]/$t[5]\n";' XX<br />
</code><br />
I&#8217;ve needed this 2x today already, and hope it helps you!</p>
<p>Edit:<br />
Someone made a comment, as people on the internet are prone to do, so here&#8217;s the long-form non-one-liner version:</p>
<p><code><br />
#!/usr/bin/perl<br />
my $addDays = shift;<br />
my ($second, $minute, $hour, $day, $month, $year, $dayOfWeek, $dayOfYear, $daylightSavings) = localtime(time());<br />
my ($fsecond, $fminute, $fhour, $fday, $fmonth, $fyear, $fdayOfWeek, $fdayOfYear, $fdaylightSavings) = localtime(time() + $addDays*24*60*60);</p>
<p>#fix 0 = 1 values, and "0 = 1900" problem:<br />
$month++;<br />
$fmonth++;<br />
$year+=1900;<br />
$fyear+=1900;</p>
<p>print "today is:                    $month/$day/$year\n";<br />
print "$addDays days from today is: $fmonth/$fday/$fyear\n";<br />
</code></p>
<p>Run it as:<br />
<code><br />
rob@laptop:~$ fdate.pl 50<br />
today is:              1/25/2012<br />
50 days from today is: 3/15/2012<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.totalnetsolutions.net/2012/01/25/what-date-is-xx-days-from-today/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic MTU in Debian/Ubuntu</title>
		<link>http://www.totalnetsolutions.net/2011/10/05/dynamic-mtu-in-debianubuntu/</link>
		<comments>http://www.totalnetsolutions.net/2011/10/05/dynamic-mtu-in-debianubuntu/#comments</comments>
		<pubDate>Wed, 05 Oct 2011 19:53:00 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://www.totalnetsolutions.net/?p=85</guid>
		<description><![CDATA[I know it&#8217;s probably an unusual situation, but in the lab we have Jumbo frames turned on for all the servers and test boxes. It makes a huge difference copying ISOs between hosts, and doing network backups. However, my Kubuntu laptop isn&#8217;t always in the lab network. This means that I almost never remember to [...]]]></description>
			<content:encoded><![CDATA[<p>I know it&#8217;s probably an unusual situation, but in the lab we have Jumbo frames turned on for all the servers and test boxes.  It makes a huge difference copying ISOs between hosts, and doing network backups.  However, my Kubuntu laptop isn&#8217;t always in the lab network.  This means that I almost never remember to change the MTU when I&#8217;m back in the office, OR I remember in the middle of a transfer, when it&#8217;s already too late to gain the benefits.</p>
<p>So I wrote a little script, and put it in /etc/network/if-up.d/ named &#8220;jumbo-frames.sh&#8221;.  The if-*.d/ structure is designed for exactly this purpose: run a script when an interface comes up.  The basic premise is: If I&#8217;m plugged into a wired network (eth0) in the lab (domain or IP address match certain parameters), then set the MTU to 9000 (jumbo frame support), otherwise assume the network has a normal MTU (1500).  This allows the system to reconfigure on the fly if I put it to sleep and go visit a customer.</p>
<p>Here&#8217;s the code:<br />
<code><br />
#!/bin/sh<br />
# Set support for jumbo frames when at home on wired network, else do not.<br />
# Determine home network based on IP address and DNS-determined name.<br />
# $IFACE should be set by the caller.</p>
<p>PATH=/sbin:/bin:/usr/sbin:/usr/bin</p>
<p>IFC=/sbin/ifconfig<br />
INT="eth0"<br />
MTU=9000<br />
DEFMTU=1500<br />
#name of the DNS domain to assume as "home"<br />
HOMED="totalnetsolutions.net"<br />
#IP Subnet to assume as "home" if DNS test fails<br />
HOMEN="10.0.0."</p>
<p>test -x $IFC || exit 0</p>
<p># Don't make changes to the wireless (wlan) or loopback (lo) interfaces<br />
if [ "$IFACE" != "$INT" ]; then<br />
    exit 0<br />
fi</p>
<p># if dhcpd is still working on writing our resolv.conf, just wait a while (it's a hack, but it works).<br />
test -f /etc/resolv.conf || sleep 15</p>
<p>DOM=`awk '/search/ { print $2 }' /etc/resolv.conf`<br />
NET=`ip addr show dev $IFACE | awk '/inet / { print $2 }' | awk -F. '{ print $1 "." $2 "." $3 "." }'`</p>
<p>if [ "$DOM" = "$HOMED" ]; then<br />
    $IFC $IFACE mtu $MTU<br />
elif [ "$NET" = "$HOMEN" ]; then<br />
    $IFC $IFACE mtu $MTU<br />
else<br />
    $IFC $IFACE mtu $DEFMTU<br />
fi<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.totalnetsolutions.net/2011/10/05/dynamic-mtu-in-debianubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HowTo: Create a dummy / empty / blank krb5.keytab file</title>
		<link>http://www.totalnetsolutions.net/2011/07/07/howto-create-a-dummy-empty-blank-krb5-keytab-file/</link>
		<comments>http://www.totalnetsolutions.net/2011/07/07/howto-create-a-dummy-empty-blank-krb5-keytab-file/#comments</comments>
		<pubDate>Fri, 08 Jul 2011 03:29:39 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[howto technology linux]]></category>

		<guid isPermaLink="false">http://www.totalnetsolutions.net/?p=80</guid>
		<description><![CDATA[We had an issue recently where we needed a dummy krb5.keytab file for an operation prior to creating the real keytab: echo -e "\0005\0002\c" >/etc/krb5.keytab]]></description>
			<content:encoded><![CDATA[<p>We had an issue recently where we needed a dummy krb5.keytab file for an operation prior to creating the real keytab:<br />
<code>echo -e "\0005\0002\c" >/etc/krb5.keytab</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.totalnetsolutions.net/2011/07/07/howto-create-a-dummy-empty-blank-krb5-keytab-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ypcat passwd: No such map passwd.byname. Reason: No such map in server&#8217;s domain</title>
		<link>http://www.totalnetsolutions.net/2011/05/23/ypcat-passwd-no-such-map-passwd-byname-reason-no-such-map-in-servers-domain/</link>
		<comments>http://www.totalnetsolutions.net/2011/05/23/ypcat-passwd-no-such-map-passwd-byname-reason-no-such-map-in-servers-domain/#comments</comments>
		<pubDate>Mon, 23 May 2011 20:19:23 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://www.totalnetsolutions.net/?p=78</guid>
		<description><![CDATA[We ran into this bit of fun while setting up a NIS domain for testing in the lab today: rob@rob-kubuntu3:~$ ypcat -d nisdom -h rhel5-64-2 passwd.byname No such map passwd.byname. Reason: No such map in server's domain It turns out this was a problem with the /var/yp/securenets file, but I&#8217;m still not sure what is [...]]]></description>
			<content:encoded><![CDATA[<p>We ran into this bit of fun while setting up a NIS domain for testing in the lab today:<br />
<code>rob@rob-kubuntu3:~$ ypcat -d nisdom -h rhel5-64-2 passwd.byname<br />
No such map passwd.byname. Reason: No such map in server's domain<br />
</code><br />
It turns out this was a problem with the <strong>/var/yp/securenets</strong> file, but I&#8217;m still not sure <strong>what</strong> is wrong.  The man page for ypserv shows:</p>
<blockquote><p>       A sample securenets file might look like this:</p>
<p>              # allow connections from local host &#8212; necessary<br />
              host 127.0.0.1<br />
              # same as 255.255.255.255 127.0.0.1<br />
              #<br />
              # allow connections from any host<br />
              # on the 131.234.223.0 network<br />
              255.255.255.0   131.234.223.0
</p></blockquote>
<p>So we set up our securenets to look like this:</p>
<blockquote><p>
host 127.0.0.1<br />
255.255.255.0 10.10.10.0
</p></blockquote>
<p>And tried to connect to the server:<code><br />
rob@rob-kubuntu3:~$ ip addr show dev wlan0 |grep "inet "<br />
    inet 10.10.10.210/24 brd 10.10.10.255 scope global wlan0<br />
rob@rob-kubuntu3:~$ ypcat -d nisdom -h rhel5-64-2 passwd.byname<br />
No such map passwd.byname. Reason: No such map in server's domain<br />
rob@rob-kubuntu3:~$ ping -c1 rhel5-64-2<br />
PING rhel5-64-2 (10.10.10.213) 56(84) bytes of data.<br />
64 bytes from rhel5-64-2 (10.10.10.213): icmp_req=1 ttl=64 time=0.823 ms</p>
<p>--- rhel5-64-2 ping statistics ---<br />
1 packets transmitted, 1 received, 0% packet loss, time 0ms<br />
rtt min/avg/max/mdev = 0.823/0.823/0.823/0.000 ms</code></p>
<p>Removing the /var/yp/securenets file allowed us access, so it wasn&#8217;t firewall or rpc or portmap issues, to the best I can determine.  Adding &#8220;host 10.10.10.210&#8243; also worked and allowed the client access.  So what&#8217;s wrong with the format / man page?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.totalnetsolutions.net/2011/05/23/ypcat-passwd-no-such-map-passwd-byname-reason-no-such-map-in-servers-domain/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Retaining mid-pipeline exit status</title>
		<link>http://www.totalnetsolutions.net/2011/02/10/retaining-mid-pipeline-exit-status/</link>
		<comments>http://www.totalnetsolutions.net/2011/02/10/retaining-mid-pipeline-exit-status/#comments</comments>
		<pubDate>Thu, 10 Feb 2011 18:40:03 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.totalnetsolutions.net/?p=47</guid>
		<description><![CDATA[I had a Bourne Shell (sh) script I needed to capture the exit status of, but it was being run through “tee” to capture a log file, so “$?” always returned the exit status of “tee”, not the script. In a nutshell, it went something like this: #!/bin/sh DO_LOG=$1 LOGNAME="`hostname`.out" if [ "$DO_LOG" -eq "1" [...]]]></description>
			<content:encoded><![CDATA[<p>I had a Bourne Shell (sh) script I needed to capture the exit status of, but it was being run through “tee” to capture a log file, so “$?” always returned the exit status of “tee”, not the script. In a nutshell, it went something like this:<br />
<code>#!/bin/sh<br />
DO_LOG=$1<br />
LOGNAME="`hostname`.out"<br />
if [ "$DO_LOG" -eq "1" ]; then<br />
# Logging is turned on, so relaunch ourself with logging disabled, and tee the output to the logfile<br />
sh $0 0 | tee $LOGNAME<br />
exit $?<br />
fi<br />
#... Do lots of things in the script<br />
exit $ERRORCODE</code></p>
<p>Now, the important thing here is that the script sets very specific error codes (we have 16 defined) based on different error states, so that a tool like HP Opsware can give us different reports based on the exit status. When run with “0″ for no logging, this works great, but it requires the controlling tool to capture logs, and not all do (especially cheap “for” loops in a shell script.)</p>
<p>But when run with logging enabled, all of the fancy error code handling (45 lines of subroutines’ worth) gets lost, because “$!” is equal to the status code of the “tee” command. Bash scripters out there will say “but what about $PIPESTATUS ?” If we could use bash, the code would be:<br />
<code>#!/bin/sh<br />
DO_LOG=$1<br />
LOGNAME="`hostname`.out"<br />
if [ "$DO_LOG" -eq "1" ]; then<br />
# Logging is turned on, so relaunch ourself with logging disabled, and tee the output to the logfile<br />
sh $0 0 | tee $LOGNAME<br />
exit ${PIPESTATUS[0]}<br />
fi<br />
#... Do lots of things in the script<br />
exit $ERRORCODE</code></p>
<p>(Note the single line change in the conditional exit.)</p>
<p>But, I don’t have the luxury of bash (thanks AIX and FreeBSD and Solaris 8), so we needed to get fancy…<br />
<code>#!/bin/sh<br />
DO_LOG=$1<br />
LOGNAME="`hostname`.out"<br />
if [ "$DO_LOG" -eq "1" ]; then<br />
# Logging is turned on, so relaunch ourself with logging disabled, and tee the output to the logfile<br />
cp /dev/null $LOGNAME<br />
tail -f $LOGNAME &#038;<br />
TAILPID=$!<br />
sh $0 0 >> $LOGNAME 2>&#038;1<br />
RETURNCODE=$?<br />
kill TAILPID<br />
exit $RETURNCODE<br />
fi<br />
#... Do lots of things in the script<br />
exit $ERRORCODE</code></p>
<p>In this last example, we’re creating the empty logfile by copying /dev/null to the logname, then starting a backgrounded “tail” command on the empty file. Because we haven’t disconnected STDOUT in the backgrounding, we will still get the screen output we desire from “tail”. The script now only writes *its* output, with redirected STDOUT and STDERR, to the log file, which is already being tailed to the actual screen. At the end of the script, we capture the true exit code, clean up the tail ugliness, and exit with the desired status code.</p>
<p>This does have a serious downside that if the script encounters and error and exits, the “tail” is left running indefinitely on Linux and Solaris, since the kernel there will simply scavenge the process to be owned by init. So, if you take this method, be very careful to capture all errors you may possibly encounter. Or, just use a better scripting tool. <img src='http://www.totalnetsolutions.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.totalnetsolutions.net/2011/02/10/retaining-mid-pipeline-exit-status/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>K9Mail Hosted Exchange ActiveSync Errors Solved</title>
		<link>http://www.totalnetsolutions.net/2010/07/10/k9mail-hosted-exchange-activesync-errors-solved/</link>
		<comments>http://www.totalnetsolutions.net/2010/07/10/k9mail-hosted-exchange-activesync-errors-solved/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 18:43:36 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Exchange]]></category>
		<category><![CDATA[Open Source Software]]></category>
		<category><![CDATA[Phones]]></category>

		<guid isPermaLink="false">http://www.totalnetsolutions.net/?p=49</guid>
		<description><![CDATA[I’ve been fighting K9Mail for weeks now, trying to get it to sync with MailStreet who hosts “exchange.ms”) hosted Exchange. If you’ve already followed the instructions at the K9Mail Wiki with no success, read on. Thanks to the k9mail wiki on debugging connection issues and the fact that I already had the Android SDK installed, [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been fighting K9Mail for weeks now, trying to get it to sync with <a href="http://www.mailstreet.com">MailStreet</a> who hosts “exchange.ms”) hosted Exchange. If you’ve already followed the instructions at the <a href="https://code.google.com/p/k9mail/wiki/K9MailAndExchange">K9Mail Wiki</a> with no success, read on.</p>
<p>Thanks to the k9mail wiki on <a href="https://code.google.com/p/k9mail/wiki/LoggingErrors">debugging connection issues</a> and the fact that I already had the Android SDK installed, I was able to solve the 2 related errors I was getting. I would either get an “HTTP 404 not found” or an “HTTP 501 Not Implemented” depending on the settings I chose. With no additional settings other than suggested in the Wiki, I’d get a “501 not implemented”. If I tried to set a mailbox path, or a WebDAV path, I’d get the HTTP 404 Not Found.</p>
<p>In the debugging log, I saw that the system was calling “http://mail.$domain.exchange.ms/”$webDAVpath/Inbox – if I set it to a full URL, the full URL was getting appended. When I attempted to hit those same paths in a full browser, I’d always get an HTTP 404. So, digging in my history in Firefox, I found the following (cleaned) path:</p>
<p>http://mail.$domain.exchange.ms/exchange/$emailaddress/</p>
<p>In this case $emailaddress was my Exchange mail address with the “@” stripped out. Appending “Inbox” to the end of this path resulted in a valid load of my OWA inbox.</p>
<p>Plugging then: /exchange/$emailaddress/ into the WebDAV box in K9Mail, and my email immediately loaded up.</p>
<p>Now I have Android syncing my calendars and contacts, and k9mail is handling my massive inbox!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.totalnetsolutions.net/2010/07/10/k9mail-hosted-exchange-activesync-errors-solved/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Turn off console beep on Ubuntu 9.04</title>
		<link>http://www.totalnetsolutions.net/2009/05/04/turn-off-console-beep-on-ubuntu-9-04/</link>
		<comments>http://www.totalnetsolutions.net/2009/05/04/turn-off-console-beep-on-ubuntu-9-04/#comments</comments>
		<pubDate>Mon, 04 May 2009 18:53:56 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.totalnetsolutions.net/?p=54</guid>
		<description><![CDATA[It used to be that you could edit /etc/modprobe.d/blacklist and add “blacklist pcspkr” to turn off the console beeps entirely on Ubuntu / Kubuntu.  As of 9.04, the module is now called “snd_pcsp”. So, to turn off console (not X terminal, but tty) beeps, you can do one of the following: 1) (This is my [...]]]></description>
			<content:encoded><![CDATA[<p>It used to be that you could edit /etc/modprobe.d/blacklist and add  “blacklist pcspkr” to turn off the console beeps entirely on Ubuntu /  Kubuntu.  As of 9.04, the module is now called “snd_pcsp”.</p>
<p>So, to turn off console (not X terminal, but tty) beeps, you can do one of the following:<br />
1) (This is my preference)<br />
<code><br />
echo blacklist snd_pcsp &gt;&gt; /etc/modprobe.d/blacklist.conf<br />
</code></p>
<p>2) (I’ve done this, but it doesn’t affect all software)<br />
<code><br />
for i in 1 2 3 4 5 6<br />
do<br />
setterm -blength 0 &gt; /dev/tty$i<br />
done</code></p>
<p>3) (Only works per shell if ~/.inputrc is included)<br />
<code><br />
echo set bell-style visible &gt;&gt; ~/.inputrc<br />
</code></p>
<p>Enjoy more-sane editing from ttyX in the future!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.totalnetsolutions.net/2009/05/04/turn-off-console-beep-on-ubuntu-9-04/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Samba on Likewise Open – errors with machine accounts</title>
		<link>http://www.totalnetsolutions.net/2009/03/05/samba-on-likewise-open-errors-with-machine-accounts/</link>
		<comments>http://www.totalnetsolutions.net/2009/03/05/samba-on-likewise-open-errors-with-machine-accounts/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 18:56:48 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Open Source Software]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.totalnetsolutions.net/?p=55</guid>
		<description><![CDATA[We’ve had a few customers and Open users posting about problems with machine accounts trying to access Samba shares and getting denied with: smbd/sesssetup.c:reply_spnego_kerberos(439) Username DOM\COMPUTER1$ is invalid on this system The “$” at the end of the account name means it’s a computer account, not a user. We’re seeing this for Citrix MetaFrame application [...]]]></description>
			<content:encoded><![CDATA[<p>We’ve had a few customers and Open users posting about problems with  machine accounts trying to access Samba shares and getting denied with:<br />
<code>smbd/sesssetup.c:reply_spnego_kerberos(439) Username DOM\COMPUTER1$ is invalid on this system</code><br />
The “$” at the end of the account name means it’s a computer account,  not a user.  We’re seeing this for Citrix MetaFrame application servers  on shared storage, startup scripts not stored on a DC, and several other  cases.</p>
<p>On a Samba server joined to AD with winbind, this is easy to deal  with because Samba’s winbind can treat the computer accounts just like  user accounts, and assign them access to the unix filesystem with  whatever backend has been configured.  When a Samba server is joined  with Likewise, however, the machine accounts are not visible, and the  “username is invalid” message comes up.</p>
<p>Fortunately, Samba gives us a method to handle this, in form of the  “username map” directive in /etc/samba/smb.conf.  There are two ways to  use this, the first is with the username map file.<br />
In smb.conf, to simply add:<br />
<code> [global ]<br />
username map = /etc/samba/smbusers</code><br />
then create a file named <code>/etc/samba/smbusers</code> and populate it with localuser=aduser pairs, like:<br />
<code>COMPUTER1$ = compacct<br />
COMPUTER2$ = compacct<br />
CITRIXFARM1$ = citrxact</code><br />
and so on.  Lastly, you’ll have to add the local accounts from the pairs above:<br />
<code>useradd -c "Account for AD Computers to use Samba" compacct -G users -u 998<br />
useradd -c "Account for AD Citrix Servers to use Samba" citrxact -G users -u 999</code><br />
Then, whenever one of the AD computers in the list attempts to access the Samba share, it’ll be mapped to the local account.</p>
<p>The problem with this is when you have a lot of servers, like a  Citrix MetaFrame farm, or a Windows Server 2008 R2 Remote Desktop  Services farm, that may be changing frequently, because managing that  file could get hard. In this case there is the <code>username map script</code> directive, which is added to smb.conf as:<br />
<code> [global ]<br />
username map script = /usr/lib/samba/auth/machine-acct-map.pl</code><br />
Then download <a href='http://www.totalnetsolutions.net/wp-content/uploads/2011/05/machine-acct-map.txt'>this script</a> and save it in <code>/usr/lib/samba/auth/</code> and make it executable (<code>chmod +x /usr/lib/samba/auth/machine-acct-map.pl</code>).  Then run:<br />
<code>useradd -c "Account for AD Computers to use Samba" compacct -G users -u 998</code><br />
Now, all computers which access the share will be remapped to the  “compacct” user, and you won’t have to manage a file for every time the  server farm changes.</p>
<p><a href='http://www.totalnetsolutions.net/wp-content/uploads/2011/05/machine-acct-map.txt'>Get the file here.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.totalnetsolutions.net/2009/03/05/samba-on-likewise-open-errors-with-machine-accounts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>VMWare Workstation and Ubuntu 8.10</title>
		<link>http://www.totalnetsolutions.net/2009/01/02/vmware-workstation-and-ubuntu-8-10/</link>
		<comments>http://www.totalnetsolutions.net/2009/01/02/vmware-workstation-and-ubuntu-8-10/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 19:04:03 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[VMWare]]></category>

		<guid isPermaLink="false">http://www.totalnetsolutions.net/?p=57</guid>
		<description><![CDATA[I just finished my upgrade from Kubuntu 8.04 to 8.10 this past week (since I had downtime from work, I could afford to break things for a few days).  The upgrade went great, and I’ll write about it shortly, once I get used to the newness. Anyways; Workstation 6.5 has been giving me problems.  Because [...]]]></description>
			<content:encoded><![CDATA[<p>I just finished my upgrade from Kubuntu 8.04 to 8.10 this past week  (since I had downtime from work, I could afford to break things for a  few days).  The upgrade went great, and I’ll write about it shortly,  once I get used to the newness.</p>
<p>Anyways; Workstation 6.5 has been giving me problems.  Because of the  newness of KDE4, I initially thought it was a KDE problem, but it turns  out it’s something between Workstation 6.5 and Ubuntu 8.10.  I just ran  the “adapt –dist-upgrade-devel” command from the Ubuntu wiki to  upgrade, and upon reboot, I couldn’t “ctrl-alt-ins” or “ctrl-alt-del” to  log into my Windows VM, my “Windows/Start” key on the keyboard wouldn’t  respond, and my arrow keys wouldn’t work.  Incredibly, when I’d hit the  “down” arrow, I’d get the Windows Start menu pop up!!</p>
<p>Fix is easy, edit /etc/vmware/config and add the line below like:<br />
<code><br />
sudo vim /etc/vmware/config<br />
:$<br />
A  (that's vi-command for "go to the end of the file, and start writing a new line")<br />
xkeymap.nokeycodeMap = true<br />
</code></p>
<p>Have to restart your VMs for this change to take effect.  Thanks to <a href="http://www.yellow-bricks.com/2008/11/19/vmware-workstation-ubuntu-ctrl-alt-ins-not-working/" target="_blank">Duncan Epping</a> for this fix (he posted it in the forums, where I found it).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.totalnetsolutions.net/2009/01/02/vmware-workstation-and-ubuntu-8-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Status update for Rob – past 7 months</title>
		<link>http://www.totalnetsolutions.net/2008/11/14/status-update-for-rob-past-7-months/</link>
		<comments>http://www.totalnetsolutions.net/2008/11/14/status-update-for-rob-past-7-months/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 19:24:39 +0000</pubDate>
		<dc:creator>Robert</dc:creator>
				<category><![CDATA[Open Source Software]]></category>
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://www.totalnetsolutions.net/?p=61</guid>
		<description><![CDATA[So, any regular readers might have noticed that the posts have been slow coming the past few months.  Hopefully you don’t think that the depth in those few posts has been lacking.  I’ve been struggling with how to report that I took a new full-time job in April.  Obviously, it’s not stopping me from writing, [...]]]></description>
			<content:encoded><![CDATA[<p>So, any regular readers might have noticed that the posts have been  slow coming the past few months.  Hopefully you don’t think that the  depth in those few posts has been lacking.  I’ve been struggling with  how to report that I took a new full-time job in April.  Obviously, it’s  not stopping me from writing, but has slowed me down a bit.</p>
<p>As you may remember, back <a href="../2008/01/28/dec-2008-chicago/" target="_blank">in January</a> I was invited to speak at <a href="http://www.dec2008.com/" target="_blank">Directory Experts’ Conference, 2008</a>.   If you weren’t there, I spoke about integrating 30+ Linux servers with  a 2000-user Active Directory forest at one of the U.S.’s biggest home  improvement providers.  At the time, we had used <a href="http://www.centrify.com/directcontrol/" target="_blank">Centrify DirectControl 4.0</a> to accomplish this integration, and they were the ones who invited me to speak at DEC.</p>
<p>As part of my preparations, I reached out to Quest Software to ask about <a href="http://www.quest.com/authentication-services/" target="_blank">Vintella</a>, now renamed “Authentication Services”, and to <a href="http://www.likewisesoftware.com/" target="_blank">Likewise Software</a>,  who sent me software and support contacts (at my request), so that I  could learn Likewise Enterprise as well as I knew Centrify  DirectControl.  That was a very tall order for Likewise Software to  fill, as I had spent the past 6 months learning DirectControl inside  out.</p>
<p>After 4 weeks of building demonstration machines (with both  products), capturing video in case the demos crashed (which they  didn’t), and building a presentation and practicing it, DEC was upon  us.  I gave two presentations, one specifically for Centrify on Monday,  and the primary one on Wednesday.  At the end of both presentations, we  recieved a lot of great questions which Centrify’s Director of Product  Development helped answer.</p>
<p>At the end of the conference, Likewise offered me a job.  After many  discussions with them, my friends and family, and my customers, I  decided to take the opportunity.  This is not a decision I made to  slight Centrify, who’s support of me through my time as a customer was  amazing, and who’s assistance through the presentation was fabulous.   It’s just one of those opportunities that comes along that I couldn’t  pass up.</p>
<p>So for the past 6 months I’ve been the Project Manager for  Deployments for Likewise Software.  I’ve been on the road about 80% of  the time, working with customers to install our software in their  environments.  Many of the posts I’ve made in that time have been in  response to an issue we’ve seen or avoided at a customer of Likewise.  I  will continue to write these, and I’ll work on doing so at my old  (2007) pace of about 3-4 posts a month, since they have been (according  to my stats) useful to many people, which is the point of writing this  blog.</p>
<p>That means, no changes here compared to last year, but I will have a  wider variety of topics, and I’ll likely start mentioning our software  specifically.  I want it to be clear it’s not advertising, but just the  state of what I’m working with. Again, Centrify makes a great product,  and I was very happy to have chosen it for my needs at my previous  employer.  However, I’ve chosen to move forward with this open source  company (Likewise Software) for the next stage of my career, and will  continue to write about software and integration with a view towards  open source software.</p>
<p>Thanks for continuing to read!</p>
<p>Robert Auch</p>
]]></content:encoded>
			<wfw:commentRss>http://www.totalnetsolutions.net/2008/11/14/status-update-for-rob-past-7-months/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

