winexe 1.1 centos 6 and windows 2012 R2

One of the software applications that I use at work relies on a linux uility called “winexe”. It turns out that this particular tool is incompatible with Windows 8.1, 10 and Server 2012R2. This incompability is due to the fact that SMB 1.0 support was removed from these versions of Windows(1), and the tool uses it, so now it doesn’t work.

The major symptom is running the tool and getting the error “NT_STATUS_INVALID_PARAMETER”, but seeing that the authentication is working successfully (I confirmed this by putting in the right + wrong password and noticing the behavior change).

The fine folks over at winexe did release a version 1.1 that fixes this issue. Unfortunately, it has to be statically compiled against Samba, and a specific version at that. This took me several hours to solve, and I drew from several resources to accomplish it. Here is the process I used.

# make sure EPEL is enabled in /etc/yum.repos.d/epel.repo

# fixup a bunch of samba dependencies
yum install gcc perl mingw-binutils-generic mingw-filesystem-base mingw32-binutils mingw32-cpp mingw32-crt mingw32-filesystem mingw32-gcc mingw32-headers mingw64-binutils mingw64-cpp mingw64-crt mingw64-filesystem mingw64-gcc mingw64-headers libcom_err-devel popt-devel zlib-devel zlib-static glibc-devel glibc-static python-devel
yum install git gnutls-devel libacl1-dev libacl-devel libldap2-dev openldap-devel

#per the docs, remove libbsd-devel if installed
yum remove libbsd-devel

#clone the git repos. samba is huge, like 280MB
cd /usr/src
git clone git://git.code.sf.net/p/winexe/winexe-waf winexe-winexe-waf
git clone git://git.samba.org/samba.git samba

#per winexe bug 64, samba needs to be reverted to a6bda1f2bc85779feb9680bc74821da5ccd401c5
#
cd /usr/src/samba
git reset --hard a6bda1f2bc85779feb9680bc74821da5ccd401c5

#fixup the build deps. I chose to build it as big and static as I could, so the only linked dependency is gnutls
# cd /usr/src/winexe-winexe-waf/source
# modify 'wscript_build', and at the very end ...
stlib='smb_static bsd z resolv rt'
lib='dl gnutls'

#build it! this does a huge configure, then also compiles samba, which takes a while.
./waf --samba-dir=../../samba configure build

#executable should be  /usr/src/winexe-winexe-waf/source/build/winexe-static

Plenty of help from the following URLs:
(1) http://sourceforge.net/p/winexe/bugs/30/#a8c8
http://sourceforge.net/p/winexe/bugs/64/
http://sourceforge.net/p/winexe/winexe-waf/ci/master/tree/README
https://www.reddit.com/r/linuxadmin/comments/2xsmge/winexe_1001_for_centos_6_x86_64/cp3a4e8

Review: The Old Man and the Sea

May sound crazy, but I never read Ernest Hemingway’s “The Old Man and the Sea” until today. Here are my thoughts.

The Writing. I found the way this story was presented to be really off-putting at first. It has this aggressive, almost clipped sentence structure that leaves very little room for ambiguity or interpretation. I think this is really interesting because it stopped me from focusing on the words themselves, with their lack of complexity, and allowed me to weave a very visual imagination of the story. Many times Hemingway references the Old Man’s hands, the cuts, the coloring of the fish, but does so with such brevity, no, /terse/ language that it really let me hone my own mental picture.

That said, I think with some more complex language the story could have been much more intellectually stimulating, or challenging, but I do think this would have limited the impact of the story and made it less accessible. I also appreciated the continual repetition of various plot devices — the relationship between the Old Man and his catch, his hands & body, and the relationship with the Boy — in a very mechanical method which really drove home the feelings invoked by my own imagination. Quite impressive that this was done with such simplicity, without forcing me to reason through and internalize the content to get the message.

The Story. I really appreciated the story, and it hit a chord with me: as a suburban husband with a regular job, family, and a lawn to mow, TOMatS presented as the struggle of man, nature, survival, and the affirmation of self and identity in the face of adversity.

I think that the vast majority of Americans won’t ever know the struggle like the Old Man. I mean, nobody really does the back-breaking work against an unyielding earth, just to scrape by. The refinements in technology have removed this component from most people’s lives, even including farmers and other folks who work the land; the very minute fisherman population of the world may experience it as this story tells it, although even they are going away in favor of fish farming. The stark presentation of the story really made me reflect on how much I yearn for that — I would /like/ to be a tough-as-nails, can-do anything sort of person, but I’m just not, and maybe I’m OK with that? Regardless, the story pulled at a very visceral need for challenging, or surviving, nature.

The Old Man is presented as almost crazy in a few places throughout the story, and I really appreciated that even in the harshest of circumstances the Old Man stays true to himself. Throughout the story, he ensures his continued performance through self-talk — smothering his self-doubt with his own desire to be who he /wants/ to be, rather than who or where he is. This is loudest when he promises to say 100 Hail Mary’s, not now because he’s busy, but in the future. I personally appreciated this, as I think that reflection, and self-talk are critical to honing my own
character.

Finally, the ending of the story is tragically acceptable. When I finished the book, I put it down and was a bit sad; I wanted more, but knew I didn’t need more as the story was complete. There is no pretty bow, no wrap-up. In fact, the ending is a bit melancholy, but wholly acceptable for what it is — the fervent struggle against nature and one’s own limits, eventually ending with life just “going on.” No parades, no applause, just … recovery, and then back to it. Although packaged in an attractive, man-vs-nature box, I think everyone can really see their own struggle-win-lose-mundane life reflected in this story.

The characters. The character development in this book is not particularly nuanced, although it is deep. The language used allowed me to portray this grizzled fisherman in my mind, and to almost build my own backstory, intertwined with the deliciously slight details about the Man’s history. I appreciate that he has a name, that he has a background in arm-wrestling, and that he has a father-son relationship with the Boy who isn’t his … but these are all little bits that don’t impact the story, but definitely did what they’re to do: reel me in and make me love him. I adored the Old Man, and considered that he could have been my own father, and that I wanted to be like him: staunch, determined, tough, self-confident. Although it wasn’t a very deep presentation of the character, I truly did become attached to him, and was actually quite sad that there was no ticker-tape parade, that he didn’t “win big,” because he /should/ have … but in real life, people don’t win big like that, they just make it to tomorrow, and this made me love him.

So there’s my review on this book. I thought it was fantastic, and I totally understand how this novella rocketd Hemingway to (inter?)national fame. If you don’t have it, borrow my copy, or pick it up from the library, or swing by your local bookstore today!

Grade: A+