Samba – Address family not supported by protocol

After upgrading to Fedora 39, we started having problems with Samba falling over on startup. The server has IPv6 disabled, and (evidently) something is not happy about that. I guess we could enable IPv6, but we don’t really need it.

Adding the following to lines to the GLOBAL section of the smb.conf file and restarting samba sorted it:

bind interfaces only = yes
interfaces = lo eth0

 

Feb 11 06:26:01 systemd[1]: Started smb.service – Samba SMB Daemon.
Feb 11 06:26:01 smbd[1109]: [2024/02/11 06:26:01.285076, 0] ../../source3/smbd/server.c:1091(smbd_open_one_socket)
Feb 11 06:26:01 smbd[1109]: smbd_open_one_socket: open_socket_in failed: Address family not supported by protocol
Feb 11 06:26:01 smbd[1109]: [2024/02/11 06:26:01.290022, 0] ../../source3/smbd/server.c:1091(smbd_open_one_socket)
Feb 11 06:26:01 smbd[1109]: smbd_open_one_socket: open_socket_in failed: Address family not supported by protocol
Feb 11 08:01:43 systemd[1]: Stopping smb.service – Samba SMB Daemon…
Feb 11 08:01:43 systemd[1]: smb.service: Deactivated successfully.
Feb 11 08:01:43 systemd[1]: Stopped smb.service – Samba SMB Daemon.

Python: Listing XML tags

I was having a lot of trouble using find/findall when parsing an XML document — turns out the namespace prefixed the tag name … so I needed to find {http://maven.apache.org/POM/4.0.0}groupId instead of just groupId

How do you figure that out? Quickest way, for me, was just to print out all of the tag names.

from lxml import etree
# Load POM XML into tree
tree = etree.parse( strXMLFile )

# # List all element names in XML document
for element in tree.iter():
     print(element.tag)

AI Personas

I’ve seen people have a bit of fun with AI personas — pre-prompts that say “be a pirate” or something similarly silly, but you can use the personas to gear answers toward yourself as the target audience too — deeply technical or “explain it like I’m five”.

Although the AI takes “like I am 5” a little too literally — don’t need smart little elves or castles.

The technical pre-prompt, though, avoids getting high level basic facts that you already know.

Tangzhong Chocolate Chip Cookies

Ingredients:

  • 2 cups (426g) light brown sugar, packed
  • 2 teaspoons table salt
  • 16 tablespoons (226g) unsalted butter, cut into 1″ pieces
  • 1/2 cup (113g) milk, whole preferred
  • 2 3/4 cups (330g) flour
  • 2 large eggs, cold from the refrigerator
  • 1 tablespoon vanilla extract
  • 1 3/4 teaspoons baking powder
  • 1/4 teaspoon baking soda
  • 2 cups (340g) semi-sweet chocolate chips
  • In a large bowl, combine the brown sugar and salt. Set aside.
  • In a saucepan over medium-high heat, melt the butter. After several minutes, the butter will sizzle and may spatter. Continue to cook the butter, swirling the pan regularly, for about 5 to 7 minutes, until it’s a dark golden brown color and brown bits start collecting at the bottom of the pan; the butter will have stopped sizzling and may also have a layer of foam on the surface.

  • Once the butter is browned, immediately pour it over the sugar mixture (be sure to scrape out the brown bits at the bottom) and whisk vigorously to combine; this helps dissolve the sugar slightly and creates the shiny surface of the baked cookies. (The mixture will stay lumpy and won’t become smooth at this point.) Set the empty saucepan aside to cool slightly.
  • In the same saucepan used to brown the butter, combine the milk with 3 tablespoons (23g) of the bread flour and whisk until no lumps remain.
  • Place the saucepan over low heat and cook the mixture, stirring regularly with a whisk and then a flexible spatula, until it’s thickened, paste-like, and starts to come together into one mass, about 2 to 3 minutes.
  • Remove from the heat and transfer directly to the bowl with the butter and sugar. Whisk until mostly smooth; some lumps are OK.

  • Add the eggs and vanilla and continue whisking until smooth.

  • Weigh or measure the remaining 2 1/2 cups plus 1 tablespoon (307g) bread flour by gently spooning it into a cup, then sweeping off any excess. Add the bread flour to the bowl with the butter and sugar, then add the baking powder and baking soda. Using a whisk or flexible spatula, stir until well combined and no dry spots remain.
  • Place the bowl, uncovered, in the refrigerator and allow it to cool for 10 to 15 minutes.

  • While the batter is cooling, use a serrated knife to roughly chop the chocolate into coarse pieces. Avoid chopping the chocolate too fine, as small pieces will melt when mixed into the dough.

  • Remove the dough from the refrigerator and fold in the chopped chocolate. Cover the bowl and return to the refrigerator for 24 to 72 hours to allow the flavors to intensify.

  • To bake, remove the chilled cookie dough from the refrigerator and let it rest at room temperature for about 10 to 15 minutes to allow it to warm up slightly. Meanwhile, preheat the oven to 350°F with a rack in the center.

  • Scoop the dough into balls about 2 1/4″ in diameter.

  • Arrange the scooped cookie dough on parchment-lined baking sheets, spacing them 3″ to 4″ apart. For consistently shaped cookies, roll each piece of dough into a smooth ball before baking.

  • Bake the large chocolate chip cookies for 18 to 22 minutes, until the edges are set and the cookies are browned, rotating the pan halfway through baking to ensure even browning. Remove the cookies from the oven and let them rest on the baking sheets until cool enough to handle, at least 15 minutes.

Baked Corndogs

Baked corndogs aren’t quite a success. The basic idea is to make a fairly doughy corn bread that can be rolled out and wrapped around the hotdog / veggie dog / sausage.

Rollable Cornbread Dough

1 cup all purpose flour + 1 cup cornmeal
1/4 cup sugar
1 tsp baking soda
1/2 tsp salt
1/2 tsp ground mustard
6 tbsp butter
2 Tbsp honey
1 tbsp yeast
1/4 cup buttermilk

Combine dry ingredients, cut in butter, then add honey. Hydrate the yeast in a few tablespoons of water. Mix yeast and buttermilk in until you’ve got a firm dough.

After it sits for an hour, roll it out and cut strips to wrap the dogs. Allow to rest for about half an hour. Bake at 375 for 20 minutes.

The dough was very crumbly and a little dry. Next time, maybe a little more butter and all purpose flour to make something a little more like a croissant

Updating Fedora — System Boots to Grub Error After Update

If you film the boot sequence and look frame by frame, you’ll see that it very briefly flashes a TPM error

error: ../../grub-core/commands/efi/tpm.c:150:unknown TPM error.

 

From what I’ve been able to glean, this secure boot stuff works off of signatures. Microsoft has signatures in BIOS. Everyone else kind of inserts their keys on the fly … so you can run out of space to save these keys and be unable to boot. To work around this, every time an update gets us over the limit, we go into the secure boot DBX management menu and reset the “Forbidden Signatures” from factory default. This is 13 keys instead of 373, and the OS is able to do it’s “thing” and boot.

 

And I’m actually writing this down this time because I had spent a lot of time researching this last time Scott’s laptop failed to boot and dumped out to a grub menu. This time, I kinda know what we did and why but lost a lot of the details.