First review of “FreeBSD Mastery: Specialty Filesystems”

Sunday Morning Linux Review episode 184 discusses FreeBSD Mastery: Specialty Filesystems.

While SMLR is always worth listening to, if you want to cut right to the review (or, alternately, if you’re me coming back to look for good quotes to steal for publicity purposes), the review starts about 30 minutes in.

It’s about 1:11 into the unedited video.

Summary: the book does not suck. And some parts are actually interesting. Which is nice. The book did expose Mary to new ideas and sent her running for the manual and Wikipedia a few times, but learning is good for you, so that’s okay.

I should also note that while I offer free review copies to podcasters, SMLR insists on purchasing books for review. They say it keeps them unbiased. I won’t argue.

FreeBSD and pam_listfile

I’ve discovered unknown terrors while researching and writing PAM Mastery. Well, terrors previously unknown to me, at least. I’m certain that the OpenPAM and Linux-PAM developers are very much aware of them. (I’m also certain that they’re part of the reason DES keeps his hair cut so short, so that he can’t yank it out of his head in bloody chunks.)

Part of the writing process was building a giant spreadsheet listing operating systems, PAM versions, and which modules appear in each OS. Strictly speaking, OpenPAM proper contains very few modules. Most “OpenPAM” modules actually originate from FreeBSD. But people are free to use them, so they generally get lumped into the “OpenPAM module” bucket.

One module that’s conspicuous by its absence in pam_listfile. Pam_listfile.so lets you accept or reject access based on the username’s presence in a file. It’s much like the traditional BSD /etc/ftpusers functionality.

It’s a reasonable enough module. And I’m told that pam_listfile.so can be compiled to work on FreeBSD, but nobody’s bothered to submit a port. How to make it work is a perennial question on the FreeBSD mailing lists.

The good news is, you can easily emulate pam_listfile.so on FreeBSD using pam_exec. Pam_exec runs a command as part of the PAM chain. If the command returns 0, the module says to grant access. If the command returns 1, the module says to deny access. (Whether PAM obeys this instruction or not depends on the type of statement.)

Here I implement basic pam_listfile.so functionality in a shell script, pam_listfile.sh.

Enable pam_listfile.sh as an auth rule.

auth required pam_exec /usr/local/scripts/pam_listfile.sh

Now all you need is a script. This version of the script permits access if the username appears in /etc/validusers.

#!/bin/sh
/usr/bin/grep ^$PAM_USER$ /etc/validusers
return $?

And here’s a version that rejects access if the username appears in /etc/validusers, exactly like /etc/ftpusers. It’s a huge change, adding an entire exclamation point.

#!/bin/sh
! /usr/bin/grep ^$PAM_USER$ /etc/validusers
return $?

You could add more functions as you need. The important thing is to return either 0 or not-zero.

PAM Mastery is over half finished. I’ve completed the parts on “this is how PAM works” and have moved on to “here are some cool PAM modules that you might want to use.”

And my marketing department says I need to mention that I’m taking sponsors on the print and ebook versions of PAM Mastery.

Sponsoring “PAM Mastery”

The FreeBSD Mastery: Advanced ZFS sponsors have a complete manuscript, the version that’s been sent out for tech reviewed. I therefore feel free to solicit sponsors for PAM Mastery, at print and ebook levels.

I waffled on asking for sponsors, but more than one person told me that if people want to put money in my hand, I should take it and say “thank you.” So what the heck.

While PAM has a potentially wider audience than FM:AZ, that interest isn’t as deep. I’m expecting nowhere near as many PAM sponsors. If you want to really stand out in a list of sponsors, this is your chance.

Also, I’ll be speaking at semibug tomorrow night. Don’t miss it.

I just spammed my customers. Mea culpa.

I’m debugging a problem with a reader who bought books directly from me at tiltedwindmillpress.com. The link to download his books isn’t appearing in his account.

As part of this, I noticed that about a fraction of the orders were stuck in the “processing” stage. Customers could get their books by logging in, but the order isn’t really complete in the database. The problem user was among them.

As part of debugging, I told the system that all the “processing” orders were complete. Because they are.

I did not realize that this would send an email to each of the customers, saying that their order had completed.

It’s about 200 people.

Back to 2013.

All I can say is: mea culpa. I should have predicted this, but I didn’t. I apologize, I’m sorry.

I’ve also installed the Woocommerce Autocomplete Orders plugin, to hopefully prevent this from happening again.

Annoyingly, the customer who can’t download his books still can’t see the files. In an attempt to make things better, I’ve made them worse.

So… I’m a real sysadmin, I guess?

“FreeBSD Mastery: Advanced ZFS” in tech review

FreeBSD Mastery: Advanced ZFS went to the FreeBSD developer community and a few select folks for technical review last night.

If you bought a sponsorship, either print or ebook, the manuscript is now in your account.

FM:AZ will not be on a discount pre-order. I figure the sponsors deserve the right to satisfy their morbid curiosity over the defective, untested, uncorrected manuscript. Plus, they get a little bit of joy over their privileged status. Not to mention bragging rights.

If you’re a sponsor, I’m going to ask you to download the manuscript, go to the last page, and check the spelling of your name. While I did my best to verify them, non-English character sets might be my undoing here. Plus, I’m an idiot, which doesn’t help.

New novel in print and ebook: Butterfly Stomp Waltz

Some of you have seen this on the mailing list, others on social media. I announce ebook availability to the mailing list and then on social media. Once a fiction book hits print and Amazon ties the two formats together, I blog it.

My new crime thriller novel, Butterfly Stomp Waltz, is out. It’s a modern crime thriller with guns and explosions and heists and all that fun stuff.

I got a message earlier today from a random reader.

So I bought your book and it’s SO GREAT! I’m hardly into it and am considering faking sick for the rest of the afternoon so that I can keep reading.

I’m still waiting for the butterfly stomping part. I hope it’s monarchs. Cocky bastards. Always flapping around and landing on flowers like they’re soooooo much better than everyone else.

Yet another life goal for me: a review that says “I used a sick day to read this book.”

February 2016 status and sponsorship questions

I’m thrilled and grateful with the results of the FreeBSD Mastery: Advanced ZFS sponsorship. Eighteen ebook sponsors and eight print sponsors have made my life easier. I’ll list them at the end of this blog post.

Allan and I are very close to having a completed first draft of the book–as in, we need a couple thousand more words from Allan and we’re ready to for final pre-tech-review touch up. As we’re working chapter-by-chapter in Google Docs, I’ll then have the job of pulling all the docs into a single Word doc, applying formatting, and making sure it all hangs together as a book.

Once it’s in a single doc, I’ll upload it to the Tilted Windmill Press site so ebook and print sponsors can see an early copy if they desire.

This is a complicated book. It includes, like, actual math and stuff. There’s a limited pool of people who can do the tech review, and they’re all very busy.

With any luck, though, we will have print copies in time for BSDCan 2016.

In the meantime, I’m turning my attention to PAM Mastery. I did lots of research and analysis for this beforehand, so in theory I can just spew the book out and get it out for review.

If I’m very quick, and if absolutely everything works out correctly, I could actually have print copies of the PAM book for Penguicon.

Which leads me to another question, one I’m going to rely on you lot to answer.

Should I solicit sponsors for “PAM Mastery”?

My gut reaction to holding out my hand and asking for money is “no, don’t do it. You are not only a commercial enterprise, you are a commercial exploiter of the BSD community. Provide a worthwhile product and people will buy it.” It took me about a decade to open a tip jar, and I’m still shocked when people put something in it. Seems I caught that stupid Puritan work ethic or something.

The Advanced ZFS sponsors have not received their books yet. (Although I must say, warm showers make me a much more productive writer.) I feel a certain imbalance here–while that book is solidly under way, I’m responsible for delivering good work to my sponsors. FM:AZ is rapidly approaching the “hurry up and wait” stage.

And I don’t want to be constantly putting up a sign saying “Give me money in exchange for electrons arranged in the shape of your name.”

On the other side, people… apparently want to give me money for electrons arranged in the shape of their name.

So, what do you think? Too soon? Do it? Give it all up and become a llama smuggler?

Lastly, on the fiction front: I’ve gotten the proofreading back on my crime thriller Butterfly Stomp Waltz. Proofreader is now on to Immortal Clay 2, Kipuka Blues, and that’s due back by 20 March. I should have print copies of each to take to my writing workshop in April, and you should be able to buy both before April. Shlepping BSW into production would be a couple days work, but I’m heads-down on getting PAM Mastery done, so it’ll have to wait.

And I have a couple short stories to release, I just have to snatch the time from somewhere and get them out.

EDIT: I said I’d list the FMAZ sponsors, and forgot before hitting “publish.” Typical, Lucas. Absolutely typical.

Ebook:

1. Bruce Buskill (first sponsor ever)
2. Julien Vallée
3. Wim Wauters
4. Ollivier Robert
5. Henning Kessler
6. Geoffrey Garside
7. Theodore Durst
8. Georgiy Bulygin
9. Timur Anthony
10. Earl Percival
11. Grzegorz Mrzyglod
12. Jason Plows
13. Dominique Poulain
14. Trond Endrestøl
15. Kenneth Moyer
16. David Stiévenard
17. Mark Voltz
18. Graham Hunter

Print:
1. Dan Langille
2. TransIP B.V./Johan Schuijt
3. Thomas Scott
4. Dirk Tol
5. Justin Holcomb, in memory of Mary Lou Malott
6. Adam McDougall
7. Miguel Moll
8. Dominik B. Kowal

next talk: “FreeBSD Filesystem Fun” at March semibug

I’m slated to present at the next SemiBUG meeting.

By unpopular demand, I’ll offer “FreeBSD Filesystem Fun,” also known as “odd stuff I learned as I’ve written the FreeBSD storage books.” You’ll get content on UFS, ZFS, unionfs, various memory filesystems, and some of the really odd corners I discovered while writing the book. Warning: will contain actual math and ZFS tuning know-how.

15 March. 7 PM. Altair Engineering!

To be followed by dining at Leo’s Coney Island right next door. (We’re flexible on dinner, but somehow it always turns out to be Leo’s.)

Future meetings of note include two special guests:

On 19 April, Tom Lawrence is coming to talk about pfSense.

And on 17 May, Isaac Levy is flying in from New York City to talk about FreeBSD jails. I’d really like to fill our space for this one, as Ike is both a great speaker and making a special flight exclusively for us. Knowing Ike, I suspect that the dinner afterwards will involve beer.

June will be a BSDCan trip report, and July, Josh Grosse on porting software to OpenBSD.

Winter Arrivals

Two exciting things happened. First, we have a water heater, kindly provided by the fine folks who sponsored FreeBSD Mastery: Advanced ZFS.
water heater
A few hours after getting it, my missus declared that she believes the old water heater never worked. At all. She is also highly in favor of water pressure in a shower. Apparently my standards for heat and pressure are lacking.

Secondly, my author copies of FreeBSD Mastery: Specialty Filesystems arrived from Tilted Windmill Press.

author copies

I’ll pack some of them up for shipping this weekend.

“FreeBSD Mastery: Advanced ZFS” Table of Contents

I’ve gotten a few potential sponsors asking what Allan and I intend to put in the Advanced ZFS book. Here’s a tentative Table of Contents.

We may split, remix, slice, dice, fold, spindle, and mutilate this in the coming weeks.

0: Introduction
1: Boot Environments
2: Delegation and Jails
3: Sharing
4: Replication
5: zvols
6: Advanced Hardware
7: Caches
8: Performance
9: Tuning
10: ZFS Potpourri

I’m also looking for classic art to parody for the cover. Ideally, I’d like something where I could do another wraparound cover, as I had on FreeBSD Mastery: Specialty Filesystems. I’m very open to suggestions, which is a nice way of saying “I have no clue whatsoever.”