Economatix - Life through the lens of the Capital Markets

From the monthly archives:

August 2007

On criticism – and the struggle

by dionysus on 2007/08/28

From “TR” (Theodore Roosevelt) one of my “great seven” favorite Presidents; the “Man in the Arena” quote. from his “Citizenship in a Republic” speech, delivered on Saturday April 23rd 1910, at the Sorbonne in Paris, following his return from a year long trip to East Africa. The trip was thought by many to have stemmed from TR’s wish to avoid being seen as an influence upon his successor William H. Taft in picking cabinet, and senior members of the Administration.

“It is not the critic who counts; not the man who points out how the strong man stumbles,
or where the doer of deeds could have done them better. The credit belongs to the man who
is actually in the arena, whose face is marred by dust and sweat and blood, who strives
valiantly; who errs and comes short again and again; because there is not effort without
error and shortcomings; but who does actually strive to do the deed; who knows the great
enthusiasm, the great devotion, who spends himself in a worthy cause, who at the best knows
in the end the triumph of high achievement and who at the worst, if he fails, at least he
fails while daring greatly. So that his place shall never be with those cold and timid souls
who know neither victory nor defeat.”

Should any of you, dear readers, be sufficiently interested, you may view the speech in its glorious entirety here and also stroll through the rest of the theodore-roosevelt.com website. The site isn’t terribly sophisticated, but has a great deal of valuable material on the nations’ 26th President. A short biography of TR can also be viewed at the Whitehouse historical site here.

————

  • Share/Bookmark

Be the first to comment

In March 2006, retired Major General Paul Eaton in an unusual act of public criticism, called for then-Defense Secretary Donald Rumsfeld’s resignation. In April of that year, an even more senior retired general officer, Lt. General Greg Newbold in a lengthy article in Time Magazine slammed the administration, The Joint Chiefs of Staff and Congress for going to war in Iraq, as well as calling for Secetary Rumsfeld to resign.

In May of this year, Lt Col. Paul Yingling, an active duty officer, wrote an article in the Armed Forces Journal lambasting the Army’s general officer corps as lacking “professional character” and “moral courage.”

Now, just last Sunday, seven infantrymen and noncommissioned officers—all finishing their 15-month tours in Iraq with the 82nd Airborne Division—took to the New York Times op-ed page in a cogent and well written article, to dismiss prospects of victory as “far-fetched” and recent appraisals of progress as “flawed” and “surreal.”

This last insiders’ protest is the most jaw-dropping and may ultimately be the most potent. It is unusual enough to see officers—active or retired—publicly denouncing military superiors or civilian leaders for mistakes or deficiencies in wartime. But for NCOs—none higher in rank than staff sergeant—to air their contrary views on the war (and, implicitly, their sour views of high-ranking policy-makers) is, as far as I can tell, unprecedented: an act of, depending on your politics, great courage or outright insubordination—or, perhaps, both.

It is for this reason that the seven junior soldiers might have the deepest political impact. They, after all, are breathing, fighting specimens of “the troops,” whose interests President Bush routinely invokes to justify staying the course. One of the authors—an Army Ranger and reconnaissance-team leader, Staff Sgt. Jeremy A. Murphy—was shot in the head during the time that he and the others were writing the article. (Thankfully, he is expected to live, his co-authors note.) The op-ed piece will no doubt also be invoked as a set of boots-on-the-ground rebuttal points to whatever claims are made by Gen. David Petraeus in his much-anticipated report due mid-September.

The central point of the seven soldiers’ critique speaks to the very heart of counterinsurgency theory. They write:

“Counterinsurgency is, by definition, a competition between insurgents and counterinsurgents for the control and support of a population. To believe that Americans, with an occupying force that long ago outlived its reluctant welcome, can win over a recalcitrant local population and win this counterinsurgency is far-fetched.”

This difficulty, they say, is intensified by “the questionable loyalties and Janus-faced role of the Iraqi police and Iraqi Army.” By day, Iraqi security forces are armed and trained by U.S. military personnel. By night, they help insurgents plant bombs that maim and kill those same U.S. personnel the next day. The seven soldiers write:

“As many grunts will tell you, this is a near-routine event. Reports that a majority of Iraqi Army commanders are now reliable partners can be considered only misleading rhetoric. The truth is that [Iraqi] battalion commanders, even if well meaning, have little to no influence over the thousands of obstinate men under them, in an incoherent chain of command, who are really loyal only to their militias.”

In some campaigns, most notably in Anbar province, U.S. troops are relying on Iraqi proxies, especially Sunni tribes, to stem violence. Successful as some of these efforts are, they too have only short-lived benefits. Proxies are “essential in winning a counterinsurgency,” the soldiers write, but, in order for that strategy to work, the proxies must be “loyal to the center that we claim to support”—i.e., they must be loyal to the central government in Baghdad. The Sunni tribes, like the other sectarian militias, have no such loyalty.

Not even the most optimistic officers and analysts would claim that the United States can win this war by itself. General Petraeus, among others, has said that the military campaign cannot produce victory; it can only provide breathing room for the Iraqi political factions to reconcile and create a unified government. Many, even President Bush, are beginning to doubt if Iraq’s current nominal government can handle this.

But the seven soldiers doubt something more basic than even this: They doubt, on the basis of their own experience, that the military campaign can provide the breathing room. Even with the surge, the U.S. military must rely on the coherent cooperation of the Iraqi police and military, and the soldiers say in their op-ed piece, that the Iraqi police and military are part of the problem.

It is important to note that, at least on the face of the op-ed piece, the seven soldiers are not anti-war. In fact, the piece states,

“While we have the will and the resources to fight in this context, we are effectively hamstrung because realities on the ground require measures we will always refuse—namely, the widespread use of lethal and brutal force.”

Here they open up, but don’t go on to address, a broader issue: The cases of “successful” counterinsurgency campaigns that many advocates and historians cite—most notably, the Americans in the Philippines, the British in Malaya—involved much more brutality than we would likely tolerate today and perhaps more casualties and time as well. This raises a still larger question (which some officers and specialists, including a few who helped Petraeus write the Army’s recent field manual on counterinsurgency, regard as the question): Is the U.S. military—and are the American people—well-suited and prepared to fight these kinds of wars, once they understand just what they entail?

————

  • Share/Bookmark

Be the first to comment

1. Because he had only one major publication.
2. And it was in Hebrew.
3. And it had no cited references.
4. And it wasn’t published in a refereed journal or even submitted for peer review.
5. And some even doubt he wrote it himself.
6. It may be true that he created the world, but what has he done since?
7. The scientific community has had a really rough time trying to replicate his results.
8. He rarely came to class, just told students to read the book.
9. He expelled his first two students for learning.
10. Although there were only ten requirements, most students failed his tests.
11. His office hours were infrequent and usually held on a mountain top.

————

  • Share/Bookmark

Be the first to comment

No comment

by dionysus on 2007/08/22

anal_sharpener.jpg

I don’t think there is anything I can add in the way of comment/caption to this! (Ed: To see this full size, click on the image)

  • Share/Bookmark

Be the first to comment

Too silly to be true?

by dionysus on 2007/08/20

Nope, not too silly at all. Real in fact. Hilariously or chillingly – depending on your point of view – true.

“We have good reason to believe he was stabbed. There was a sharp
object measuring 13.5″ in length, sticking out of his chest”.
- Lt. R. Travis, Newburgh, NY, Police Dept

—————-

“With the exception of the killing and maiming episodes over the past 15 years, Washington DC has one of the lowest crime rates in the country. ”
- Mayor Marion Barry, Washington DC Mayor

—————-

“If you take your hands off the car, I’ll make your birth certificate a worthless document”
-Unknown patrol officer, while detaining suspect

—————-

  • Share/Bookmark

1 comment

Men vs. Women

by dionysus on 2007/08/17

The differences between the two, perfectly explained:

lifeexplained.jpg

  • Share/Bookmark

Be the first to comment

Global Political Systems – explained.

by dionysus on 2007/08/17

OK, using cows as a perfect example, here are the political systems of the world explained in terms that the layman can understand:

FEUDALISM:

You have two cows. Your lord takes some of the milk.

PURE SOCIALISM:

You have two cows. The government takes them and puts them in a barn with everyone else’s cows. You have to take care of all of the cows. The government gives you as much milk as you need.

BUREAUCRATIC SOCIALISM:

You have two cows. The government takes them and put them in a barn with everyone else’s cows. They are cared for by ex-chicken farmers. You have to take care of the chickens the government took from the chicken farmers. The government gives you as much milk and eggs as the regulations say you need.

FASCISM:

You have two cows. The government takes both, hires you to take care of them and sells you the milk.

PURE COMMUNISM:

You have two cows. Your neighbors help you take care of them, and you all share the milk.

RUSSIAN COMMUNISM:

You have two cows. You have to take care of them, but the government takes all the milk.

CAMBODIAN COMMUNISM:

You have two cows. The government takes both of them and shoots you.

DICTATORSHIP:

You have two cows. The government takes both and drafts you.

PURE DEMOCRACY:

You have two cows. Your neighbors decide who gets the milk.

REPRESENTATIVE DEMOCRACY:

You have two cows. Your neighbors pick someone to tell you who gets the milk.

BUREAUCRACY:

You have two cows. At first the government regulates what you can feed them and when you can milk them. Then it pays you not to milk them. Then it takes both, shoots one, milks the other and pours the milk down the drain. Then it requires you to fill out forms accounting for the missing cows.

PURE ANARCHY:

You have two cows. Either you sell the milk at a fair price or your neighbors try to take the cows and kill you.

LIBERTARIAN/ANARCHO-CAPITALISM:

You have two cows. You sell one and buy a bull.

SURREALISM:

You have two giraffes. The government requires you to take harmonica lessons.

  • Share/Bookmark

1 comment

14 things it took me 50 years to learn

by dionysus on 2007/08/17

14 things it took me 50 years to learn (by Dave Barry)

1. Never, under any circumstances, take a sleeping pill and a laxative on the same night.

2. There is a very fine line between “hobby” and “mental illness.”

3. If you had to identify, in one word, the reason why the human race has not achieved, and never will achieve, its full potential, that word would be “meetings.”

4. People who want to share their religious views with you, almost never want you to share yours with them.

5. You should not confuse your career with your life.

6. Nobody cares if you can’t dance well. Just get up and dance.

7. Never lick a steak knife.

8. The most destructive force in the universe is gossip.

9. You will never find anybody who can give you a clear and compelling reason why we observe daylight savings time.

10. There comes a time when you should stop expecting other people to make a big deal about your birthday. That time is age eleven.

11. The one thing that unites all human beings, regardless of age, gender, religion, economic status or ethnic background, is that, deep down inside, we ALL believe that we are above-average drivers.

12. A person who is nice to you, but rude to the waiter, is not a nice person. (This is very important. Pay attention. It never fails.)

13. Your friends love you anyway.

14. Never be afraid to try something new. Remember that a lone amateur built the Ark. A large group of professionals built the Titanic.

  • Share/Bookmark

1 comment

Memories

by dionysus on 2007/08/16

This is nostalgia, pure and simple. Indulge me if you will. I’m in one of those “fond remembrance” modes we all periodically experience. You may wish to check out the footnotes for a reasonably comprehensive list of sources for this material.

———————————

A student, in hopes of understanding the Lambda-nature, came to Greenblatt.
As they spoke a Multics system hacker walked by. “Is it true”, asked the student, “that PL-1 has many of the same data types as Lisp”. Almost before the student had finished his question, Greenblatt shouted, “FOO!”, and hit the student with a stick.

——————————–

A cocky novice once said to Stallman: “I can guess why the editor is called Emacs, but why is the justifier called Bolio?”.
Stallman replied forcefully, “Names are but names, `Emac & Bolio’s` is the name of a confectionary shop in Boston-town.
Neither of these men had anything to do with the software.”
His question answered, yet unanswered, the novice turned to go, but Stallman called to him,
“Neither Emac or Bolio had anything to do with the ice cream shop, either.”

——————————–

A student of another discipline once came to Drescher as he was eating his morning meal.
“I would like to give you this personality test”, said the outsider, “because I want you to be happy.”
Drescher took the paper that was offered him and put it into the toaster, saying: “I wish the toaster to be happy, too.”

——————————–

In the days when Sussman was a novice, Minsky once came to him as he sat hacking at the PDP-11.
“What are you doing?”, asked Minsky.
“I am training a randomly wired neural net to play Tic-Tac-Toe” Sussman replied.
“Why is the net wired randomly?”, asked Minsky.
“I do not want it to have any preconceptions of how to play”, Sussman said.
Minsky then shut his eyes.
“Why do you close your eyes?”, Sussman asked his teacher.
“So that the room will be empty.”
At that moment, Sussman was Enlightened.

——————————–

A man from AI walked across the mountains to SAIL to see the Master, Knuth. When he arrived, the Master was nowhere to be found. “Where is the wise one named Knuth?”, he asked a passing student. “Ah,” said the student, “you have not heard. He has gone on a pilgrimage across the mountains to the temple of AI to seek out new disciples.” Hearing this, the man was Enlightened.

——————————–

A famous Lisp Hacker noticed an Undergraduate sitting in front of a Xerox 1108, trying to edit a complex Klone network via a browser. Wanting to help, the Hacker clicked one of the nodes in the network with the mouse, and asked “what do you see?” Very earnesty, the Undergraduate replied “I see a cursor.” The Hacker then quickly pressed the boot toggle at the back of the keyboard, while simultaneously hitting the Undergraduate over the head with a thick Interlisp Manual. The Undergraduate was then Enlightened.

——————————–

So Sussman began working on a program. Not long after, this odd-looking bald guy came over. Sussman figured the guy was going to boot him out, but instead the man sat down, asking, “Hey, what are you doing?” Sussman talked over his program with the man, Marvin Minsky. At one point in the discussion, Sussman told Minsky that he was using a certain randomizing technique in his program because he didn’t want the machine to have any preconceived notions. Minsky said, “Well, it has them, it’s just that you don’t know what they are.” It was the most profound thing Gerry Sussman had ever heard. And Minsky continued, telling him that the world is built a certain way, and the most important thing we can do with the world is avoid randomness, and figure out ways by which things can be planned. Wisdom like this has its effect on seventeen-year-old freshmen, and from then on Sussman was hooked.

——————————–

It is recorded that once, when Master Foo was iterating along a beach, he came upon two of his disciples arguing by a computer processor.
“It is subtracting positive 1″, declared the first.
“No; it is adding negative 1″, asserted the other.
Master Foo answered them thus: “Not incrementing, not decrementing, Equalizing!” whereupon both were Enlightened.

——————————–

Master Foo and the “Ten Thousand Lines”

Master Foo once said to a visiting programmer: “There is more Unix-nature in one line of shell script than there is in ten thousand lines of C”
The programmer, who was very proud of his mastery of C, said: “How can this be? C is the language in which the very kernel of Unix is implemented!”
Master Foo replied: That is so. Nevertheless, there is more Unix-nature in one line of shell script than there is in ten thousand lines of C”
The programmer grew distressed: “But through the C language we experience the enlightenment of the Patriarch Ritchie! We become as one with the operating system and the machine, reaping matchless performance!”
Master Foo replied: “All that you say is true. But there is still more Unix-nature in one line of shell script than there is in ten thousand lines of C”
The programmer scoffed at Master Foo and rose to depart. But Master Foo nodded to his student Nubi, who wrote a line of shell script on a nearby whiteboard, and said: “Master programmer, consider this pipeline. Implemented in pure C, would it not span ten thousand lines?”
The programmer muttered through his beard, contemplating what Nubi had written. Finally he agreed that it was so.
“And how many hours would you require to implement and debug that C program?” asked Nubi.
“Many” admitted the visiting programmer. “But only a fool would spend the time to do that when so many more worthy tasks await him.”
“And who better understands the Unix-nature?” Master Foo asked. “Is it he who writes the ten thousand lines, or he who, perceiving the emptiness of the task, gains merit by not coding?”
Upon hearing this, the programmer was Enlightened.

——————————–

Master Foo and the Script Kiddie

A stranger from the land of W00t came to Master Foo as he was eating the morning meal with his students.
“I hear y00 are very l33t” he said. “Pl33z teach m3 all y00 know.”
Master Foo’s students looked at each other, confused by the stranger’s barbarous language. Master Foo just smiled and replied: “You wish to learn the Way of Unix?”
“I want to b3 a wizard hax0r” the stranger replied, “and 0wn ever3one’s b0xen.”
“I do not teach that Way” replied Master Foo.
The stranger grew agitated. “D00d, y00 r nothing but a p0ser” he said. “If y00 n00 anything, y00 wud t33ch m3.”
“There is a path” said Master Foo, “that might bring you to wisdom” The master scribbled an IP address on a piece of paper. “Cracking this box should pose you little difficulty, as its guardians are incompetent. Return and tell me what you find”
The stranger bowed and left. Master Foo finished his meal.
Days passed, then months. The stranger was forgotten.
Years later, the stranger from the land of W00t returned.
“Damn you!” he said, “I cracked that box, and it was easy like you said. But I got busted by the FBI and thrown in jail.”
“Good” said Master Foo. “You are ready for the next lesson” He scribbled an IP address on another piece of paper and handed it to the stranger.
“Are you crazy?” the stranger yelled. “After what I’ve been through, I’m never going to break into a computer again!”
Master Foo smiled. “Here” he said, “is the beginning of wisdom”
On hearing this, the stranger was Enlightened.

——————————–

Master Foo discourses on the “Two Paths”

Master Foo instructed his students:
“There is a line of dharma teaching, exemplified by the Patriarch McIlroy’s mantra “Do one thing well”™, which emphasizes that software partakes of the Unix way when it has simple and consistent behavior, with properties that can be readily modeled by the mind of the user and used by other programs.
But there is another line of dharma teaching, exemplified by the Patriarch Thompson’s great mantra “When in doubt, use brute force”™, and various sutras on the value of getting 90% of cases right now, rather than 100% later, which emphasizes robustness and simplicity of implementation.
“Now tell me: which programs have the Unix nature?”
After a silence, Nubi observed:
“Master, these teachings may conflict. A simple implementation is likely to lack logic for edge cases, such as resource exhaustion, or failure to close a race window, or a timeout during an uncompleted transaction. When such edge cases occur, the behavior of the software will become irregular and difficult. Surely this is not the Way of Unix?”
Master Foo nodded in agreement.
“On the other hand, it is well known that fancy algorithms are brittle. Further, each attempt to cover an edge case tends to interact with both the program’s central algorithms and the code covering other edge cases. Thus, attempts to cover all edge cases in advance, guaranteeing ‘simplicity of description’, may in fact produce code that is overcomplicated and brittle or which, plagued by bugs, never ships at all. Surely this is not the Way of Unix?”
Master Foo nodded in agreement.
“What, then, is the proper dharma path?” asked Nubi.
The master spoke:
“When the eagle flies, does it forget that its feet have touched the ground? When the tiger lands upon its prey, does it forget its moment in the air? Three pounds of VAX!”
On hearing this, Nubi was Enlightened.

——————————–

Master Foo discourses on the Graphical User Interface

One evening, Master Foo and Nubi attended a gathering of programmers who had met to learn from each other. One of the programmers asked Nubi to what school he and his master belonged. Upon being told they were followers of the Great Way of Unix, the programmer grew scornful.
“The command-line tools of Unix are crude and backward”  he scoffed. “Modern, properly designed operating systems do everything through a graphical user interface”
Master Foo said nothing, but pointed at the moon. A nearby dog began to bark at the master’s hand.
“I don’t understand you!” said the programmer.
Master Foo remained silent, and pointed at an image of the Buddha. Then he pointed at a window.
“What are you trying to tell me?” asked the programmer.
Master Foo pointed at the programmer’s head. Then he pointed at a rock.
“Why can’t you make yourself clear?” demanded the programmer.
Master Foo frowned thoughtfully, tapped the programmer twice on the nose, and dropped him in a nearby trashcan.
As the programmer was attempting to extricate himself from the garbage, the dog wandered over and pissed on him.
At that moment, the programmer achieved Enlightenment.

——————————–

Master Foo and the Unix Zealot

A Unix zealot, having heard that Master Foo was wise in the Great Way, came to him for instruction. Master Foo said to him:
“When the Patriarch Thompson invented Unix, he did not understand it. Then he gained in understanding, and no longer invented it. When the Patriarch McIlroy invented the pipe, he knew that it would transform software, but did not know that it would transform mind. When the Patriarch Ritchie invented C, he condemned programmers to a thousand hells of buffer overruns, heap corruption, and stale-pointer bugs. Truly, the Patriarchs were blind and foolish!”
The zealot was greatly angered by the Master’s words.
“These enlightened ones” he protested. “gave us the Great Way of Unix. Surely, if we mock them we will lose merit and be reborn as beasts or MCSEs”
“Is your code ever completely without stain and flaw?” demanded Master Foo.
“No” admitted the zealot, “no man’s is”
“The wisdom of the Patriarchs” said Master Foo, “was that they knew they were fools”
Upon hearing this, the zealot was Enlightened.

——————————–

Master Foo discourses on the Unix Nature

A student said to Master Foo: “We are told that the firm called SCO holds true dominion over Unix”
Master Foo nodded.
The student continued, “Yet we are also told that the firm called OpenGroup also holds true dominion over Unix”
Master Foo nodded.
“How can this be?” asked the student.
Master Foo replied:
“SCO indeed has dominion over the code of Unix, but the code of Unix is not Unix. OpenGroup indeed has dominion over the name of Unix, but the name of Unix is not Unix”
“What, then, is the Unix-nature?” asked the student.
Master Foo replied:
“Not code. Not name. Not mind. Not things. Always changing, yet never changing. The Unix-nature is simple and empty. Because it is simple and empty, it is more powerful than a typhoon. Moving in accordance with the law of nature, it unfolds inexorably in the minds of programmers, assimilating designs to its own nature. All software that would compete with it must become like to it; empty, empty, profoundly empty, perfectly void, hail!”
Upon hearing this, the student was Enlightened.

——————————–

Master Foo and the End User

On another occasion when Master Foo gave public instruction, an end user, having heard tales of the Master’s wisdom, came to him for guidance.
He bowed three times to Master Foo. “I wish to learn the Great Way of Unix” he said “but the command line confuses me”
Some of the onlooking neophytes began to mock the end user, calling him “clueless” and saying that the Way of Unix is only for those of discipline and intelligence.
The Master held up a hand for silence, and called the most obstreperous of the neophytes who had mocked forward, to where he and the end user sat.
“Tell me” he asked the neophyte, “of the code you have written and the works of design you have uttered”
The neophyte began to stammer out a reply, but fell silent.
Master Foo turned to the end-user. “Tell me” he inquired, “why do you seek the Way?”
“I am discontent with the software I see around me” the end user replied. “It neither performs reliably nor pleases the eye and hand. Having heard that the Unix way, though difficult, is superior, I seek to cast aside all snares and delusions”
“And what do you do in the world” asked Master Foo, “that you must strive with software?”
“I am a builder” the end user replied, “Many of the houses of this town were made under my chop”
Master Foo turned back to the neophyte. “The housecat may mock the tiger” said the master, “but doing so will not make his purr into a roar”
Upon hearing this, the neophyte was Enlightened.

——————————–

Footnotes, thanks & credits:

I am indebted to innumerable people for material contained within this compendium.

To begin with, we all owe a debt to the original founders of Unix.

Ken Thompson author of “B” the precursor to Dennis Ritchie’s “C” language

Dennis Ritchie (plus obligatory Wikipedia page here)the author of “C” in conjunction with Brian Kernighan

Doug McIlroy – (plus obligatory Wikipedia page here) inventor of pipelining

The “Koan’s” above come from a variety of sources.

These are a genre or jokes passed around MIT in the early days. The original koans were written by Danny Hillis while studying there for his EECS PhD (under doctoral advisor Gerald Sussman). Danny Hillis would later found Thinking Machine and go on from there to work for Disney Imagineering.

Later, Eric S. Raymond in 1996 would take over maintenance of “The Jargon File” which was subsequently published as “The New Hacker’s Dictionary”, published (not coincidentally) by MIT Press, and can be ordered here. As the jargon file grew, it gained appendices. One of which was AI Koans viewable here. This gave rise to “The Unix Koans of Master Foo” viewable in their original form here

I may accidentally have left someone out of this nostalgic food chain. If so, please accept my apologies for the omission, and let me know via our contact form of the nature of the omission, and what should be included to correct the record.

  • Share/Bookmark

1 comment

Command Line Password Generator

by dionysus on 2007/08/06

I use a password generator quite often, because of creating users/accounts/blogs/galleries and the like. Until now I’ve always used goodpassword.com Now that’s a handy site, but on the occasions I’m setting up clients & sites (for example) in Plesk, it’s one more browser window I have to keep open. “Dude, no problem! your two monitors should be enough” you say – actually, no, but that’s a story for another day.

So today I found something that is SUPER handy, it’s called “mkpasswd”. In some Linux distros this may be standard, but it’s not in the yum repositories of CentOS, so I had to manually install it. It’s a trivial process, here’s how:

dogshit@wanker $ sudo su – #let’s get root first
root@wanker # yum install expect #got 5 seconds to spare? this is a real quicky
root@wanker # cd /usr/bin #yes, really, you’ll see why in 2 moves from now
root@wanker # wget http://public.tux-planet.fr/expect/mkpasswd #Adjust mirror to suit local taste
root@wanker # chmod 755 mkpasswd

OK, it’s now installed, it’s time to put it to work. Let’s look at the available options:

-l defines the length of the password (default = 9)
-d number of digits that can be in the password (default = 2)
-c defines the minimum number of permitted lowercase characters that can appear in the password (default = 2)
-C defines the minimum number of permitted upperercase characters that can appear in the password (default = 2)
-s defines the minimum number of special characters that can appear in the password (default = 1)

There are other flags, but these are the most useful ones.
Because I use aliases for damn near everything on my system, here’s the .profile alias that creates an 8 character password with two numbers in it, 2 lowercase letters, and no special characters.

alias mkp=”/usr/bin/mkpasswd -l 8 -s 0″
(we accept the -C -c & -d defaults to make this simple)

Voila monsieur!

  • Share/Bookmark

1 comment