<?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>Yesterday's Thoughts &#187; Linux</title>
	<atom:link href="http://www.warmroom.com/yesterdays/category/software-internet/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.warmroom.com</link>
	<description>Reflections on family life, software, politics and endurance sports.</description>
	<lastBuildDate>Sat, 10 Sep 2011 20:46:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client</title>
		<link>http://www.warmroom.com/yesterdays/2005/10/04/mysql_connect-client-does-not-support-authentication-protocol-requested-by-server-consider-upgrading-mysql-client/</link>
		<comments>http://www.warmroom.com/yesterdays/2005/10/04/mysql_connect-client-does-not-support-authentication-protocol-requested-by-server-consider-upgrading-mysql-client/#comments</comments>
		<pubDate>Tue, 04 Oct 2005 07:46:33 +0000</pubDate>
		<dc:creator>Ray Baxter</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software & Internet]]></category>

		<guid isPermaLink="false">http://www.warmroom.com/wordpress/?p=140</guid>
		<description><![CDATA[If you receive this error message, the answer to your question is here. Don&#8217;t go anywhere else. After wading through substantial non-sense, Pat Hayzlett points out the answer here. The problem in a nut shell is that mySQL 4.1 changed their password hashing and now store the passwords of database users in 40 chars instead [...]]]></description>
			<content:encoded><![CDATA[<p>If you receive this error message, the answer to your question is <a href="http://dev.mysql.com/doc/mysql/en/old-client.html">here</a>. Don&#8217;t go anywhere else.</p>
<p>After wading through substantial non-sense, Pat Hayzlett points out the answer <a href="http://forums.mysql.com/read.php?11,6400,14386#msg-14386">here</a>.</p>
<p>The problem in a nut shell is that mySQL 4.1 changed their password hashing and now store the passwords of database users in 40 chars instead of 16 as formerly. A number of clients cannot handle these wider passwords, including recent versions of php.</p>
<p>This is a public service announcement for the desperate. Normally Google is fairly effective at pointing out the solutions for very specific problems such as this, but it took a while for me to wade through the dross. If you are having this problem, follow the links. In the comments section at dev.mysql.com are instructions for modifying your php installation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.warmroom.com/yesterdays/2005/10/04/mysql_connect-client-does-not-support-authentication-protocol-requested-by-server-consider-upgrading-mysql-client/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Emacs and emacsclient</title>
		<link>http://www.warmroom.com/yesterdays/2005/08/15/emacs-and-emacsclient/</link>
		<comments>http://www.warmroom.com/yesterdays/2005/08/15/emacs-and-emacsclient/#comments</comments>
		<pubDate>Mon, 15 Aug 2005 07:41:59 +0000</pubDate>
		<dc:creator>Ray Baxter</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.warmroom.com/wordpress/?p=115</guid>
		<description><![CDATA[I use emacs as my preferred text editor. In general I prefer text files to more complicated or proprietary formats such as Word .doc files. Text is easy to use. Text files are small. Text can be processed with standard tools such as grep, diff, sed and awk. In that light emacs is a somewhat [...]]]></description>
			<content:encoded><![CDATA[<p>I use emacs as my preferred text editor. In general I prefer text files to more complicated or proprietary formats such as Word .doc files. Text is easy to use. Text files are small. Text can be processed with standard tools such as grep, diff, sed and awk.</p>
<p>In that light emacs is a somewhat heavy tool, but I have become accustomed to it and there are frequently tasks that emacs can do, that would be much harder with any other set of tools, such as cutting a particular rectangle out of the middle of a text file, or the kind of processing that is possible with a particular query-replace-regexp or keyboard macro. Moore&#8217;s Law has solved the only issues that I ever had with emacs, I can now run it on every computer that I own. In any case, I have been using emacs off and on for almost 20 years as my programming environment. I keep trying other tools and environments, but I always end up returning to emacs.</p>
<p>The one set of infelicities about using emacs that were still causing me to occasionally drop into vi(m) were that I hadn&#8217;t managed to configure emacs to start up correctly in all of the different situations in which I needed to use it. I use emacs in a terminal window when connected to my Linux server. Sometimes that window is direct ssh, so it supports X-forwarding, to the X-server that I may have running on my local computer. (I use <a href="http://www.xwin32.com/">X-win32</a>.) Sometimes I am running emacs on my local computer, editing both local and remote files. And most problematically sometimes I am deep in some other tool and relying on the value of my shell EDITOR variable to determine what editor to start up.</p>
<p>The issue is that each of these situations has two alternatives: when I have already started emacs, and when I haven&#8217;t. When I have already started emacs, I want to use that existing emacs so that I can take advantage of being able to access the other windows that I have open, refer to a man page, etc. There is a tool to do that, if you start the first instance of emacs that you open as a server, then later instances can connect to that server with the emacsclient command. I use gnuclient on Windows which solves these problems there, but I still have problems when on Linux.</p>
<p>The problem is that if I defined my EDITOR as emacsclient, then the command would fail half the time because I hadn&#8217;t first started the server. If I defined the EDITOR as emacs (the server) then the command failed the other half of the time.</p>
<p>Christoph Pfisterer posted about 85% of the solution to my problems <a href="http://chrisp.de/en/rsrc/emacs.html">here</a>. He wrote a set of scripts to test for the definition of the DISPLAY variable, the universal indicator for the presence of X, and the file that the emacs server uses, and launching plain terminal emacs, emacs server, or emacsclient. In the last two cases, the script launches to X and then returns to the command line immediately. </p>
<p>A second script, ew,  will not return immediately in the last two cases. This version is for the case where the script is called from a tool like less or crontab, which wants to get the return from the script.</p>
<p>Actually Christoph&#8217;s version of the script will not return normally until the emacs exits in the case where there is not currently a server running. I made a simple modification to his code to handle this case. Here is the full script, tested under bash on Linux.</p>
<p><code>
!/bin/sh

EMACS=emacs
EMACSCLIENT=emacsclient
if [ -f $HOME/.emacsconfig ]; then
  . $HOME/.emacsconfig
fi

if [ -z "$DISPLAY" ]; then
  exec $EMACS "$@"
else
  tempuid=`id -u`
  temphost=`hostname`
  if [ -e "/tmp/esrv$tempuid-$temphost" ]; then
    exec $EMACSCLIENT "$@"
  else
    exec $EMACS &amp;amp;
    while [ ! -e "/tmp/esrv$tempuid-$temphost" ] ; do sleep 1 ; done
    $EMACSCLIENT "$@"
  fi
fi
</code></p>
<p>This is the change that I made:<br />
<code>
17c17,19
&amp;lt;     exec $EMACS "$@"
---
&amp;gt;     exec $EMACS &amp;amp;
&amp;gt;     while [ ! -e "/tmp/esrv$tempuid-$temphost" ] ; do sleep 1 ; done
&amp;gt;     $EMACSCLIENT "$@"
</code></p>
<p>Christoph&#8217;s code was launching emacs and was waiting for it to return before returning control. I modified it to launch emacs in the background (you might want or need to pass the parameters -f server-start, to loop until emacs opens the socket, and then to launch the emacsclient with the appropriate arguments, waiting for the return of the client, but leaving the server running.</p>
<p>My small modification solves the remaining 15% of my problem. Thanks to Christoph.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.warmroom.com/yesterdays/2005/08/15/emacs-and-emacsclient/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>useradd PASS_MAX_AGE</title>
		<link>http://www.warmroom.com/yesterdays/2005/05/24/useradd-pass_max_age/</link>
		<comments>http://www.warmroom.com/yesterdays/2005/05/24/useradd-pass_max_age/#comments</comments>
		<pubDate>Tue, 24 May 2005 17:13:00 +0000</pubDate>
		<dc:creator>Ray Baxter</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software & Internet]]></category>

		<guid isPermaLink="false">http://www.warmroom.com/wordpress/?p=42</guid>
		<description><![CDATA[On my home Linux Box (Whitebox Enterprise 3.0) I use a number of different users for various purposes. I tend to create and delete them fairly often. I suddenly started seeing a warning when creating or deleting a user: [root@server root]# adduser newuser configuration error - unknown item 'PASS_MAX_AGE' (notify administrator) [root@server root]# userdel newuser [...]]]></description>
			<content:encoded><![CDATA[<p>On my home Linux Box (Whitebox Enterprise 3.0) I use a number of different users for various purposes. I tend to create and delete them fairly often.</p>
<p>I suddenly started seeing a warning when creating or deleting a user:<br />
<code>
[root@server root]# adduser newuser
configuration error - unknown item 'PASS_MAX_AGE' (notify administrator)
[root@server root]# userdel newuser
configuration error - unknown item 'PASS_MAX_AGE' (notify administrator)
</code></p>
<p>The resources of Google were no help.<br />
<code>man adduser</code> showed me the following config files<br />
<code>
FILES
       /etc/passwd - user account information
       /etc/shadow - secure user account information
       /etc/group - group information
       /etc/gshadow - secure group information
       /etc/default/useradd - default information
       /etc/login.defs - system-wide settings
       /etc/skel - directory containing default files
</code></p>
<p>Poking through these files with grep returned:</p>
<p><code>/etc/login.defs:PASS_MAX_AGE   5</code></p>
<p><code>login.defs</code> was modified about a month ago, I don&#8217;t know how or why. <code>useradd</code> was six months old. I assume some other package modified <code>login.defs</code>, or maybe there was a configuration step that I performed unknowingly or incorrectly. I do not recall this, but maybe I did it through a GUI. I guess I need to get my entire hierarchy under version control, and more facility with yum/up2date. </p>
<p>Anyway, if <code>PASS_MAX_AGE</code> means what I think it does, passwords cannot be older than 5 days, or the user is forced to change it. This is bizarrely short for my purposes.</p>
<p><code>login.defs</code> is not very helpful. Here is a snippet of the file:<br />
<code>
# Password aging controls:
#
#       PASS_MAX_DAYS   Maximum number of days a password may be used.
#       PASS_MIN_DAYS   Minimum number of days allowed between password changes.
#       PASS_MIN_LEN    Minimum acceptable password length.
#       PASS_WARN_AGE   Number of days warning given before a password expires.
#
PASS_MAX_DAYS   60
PASS_MIN_DAYS   0
PASS_MIN_LEN    5
PASS_MAX_AGE   5
</code></p>
<p>The other variables are documented. <code>PASS_MAX_AGE</code> isn&#8217;t and <code>PASS_WARN_AGE</code> is documented and not used. I assume that this is a mistake.</p>
<p>Google returns 1500 hits for <code>PASS_WARN_AGE</code>.</p>
<p>I commented out the <code>PASS_MAX_AGE</code> and replaced it with <code>PASS_WARN_AGE</code>. No warnings from <code>useradd</code> and <code>userdel</code>. I will report back if anything else breaks.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.warmroom.com/yesterdays/2005/05/24/useradd-pass_max_age/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

