Skip to content
← Back to writing

October 10, 2026

File-sharing users never needed a shell

A file-sharing account on Eight.ly OS was created with a full login shell it had no use for. The fix shipped as a security release the same morning, along with a migration for every box that already had the old accounts.

On Friday afternoon I was comparing how another NAS system handles accounts that exist only to reach shared folders, and I went to check what Eight.ly OS does. It gave every one of those accounts a login shell. When an owner adds a file-sharing user, the code creates a matching Linux account so Samba has someone to authenticate, and it ran useradd with -s /bin/bash and a home directory. With SSH turned on, anyone holding a file-sharing password could sign in to a real shell on the box. That is a lot more than "can read the photos folder", and nobody had decided it; it was an argument typed once and never revisited.

I filed it as EOS-2598 at 1:37 PM and it merged as #1992 at 3:49 on Saturday morning. The security release, v2.3.76, was published at 7:52 AM. It was one of six releases that day, v2.3.74 through v2.3.79, and it is the one I would point a stranger to.

The Audit Log in Eight.ly OS Settings, filtered to a single action. One row from 10/10/2026 at 4:37:13 AM, recorded by System: Login shell access was removed from eos1295user, file sharing was left available.

New accounts are the easy half

For accounts created from now on, the fix is one argument. They get /usr/sbin/nologin, so the account can still authenticate to Samba and cannot open a shell. The same function also called exec.CommandContext directly, which our own code rules forbid, because every shell command in the product is meant to go through one runner in internal/platform, and the account creation now does.

The harder question is what to do about the accounts that already exist. Every box that had added a file-sharing user before this release was holding one with bash. If the fix only changed future behaviour, the people most exposed would be the ones who had already used the feature, and they would never find out.

So the service runs a migration at startup. It reads a ledger of the accounts Eight.ly itself created, and for each one it asks the system what shell it has. If the answer is the old /bin/bash, it runs usermod to switch it to nologin. The ledger matters here. A Unix account that someone made by hand, or one where an owner deliberately chose a different shell, is not on the list or does not match the old value, so it is left alone. The change removes something I added without anyone asking, and nothing else.

A change nobody can see is a weak fix

The ticket's second acceptance criterion said the change had to appear in the audit log. I took that as the real requirement. A silent security migration leaves an owner unable to tell whether it ran, and it leaves nobody able to say later that it did.

Most of the seven commits in that pull request went into this part. The first version recorded the change and moved on. The case that needed more thought was the audit write failing after the shell had already been changed, which leaves the box safe and the record missing. A failed write is now reported in the startup log by name, and the next start tries again. The startup pass also writes a "verified" row for every account that is already on nologin, so a box that has been checked says so every time it starts. Two follow-up commits closed the gaps in that retry logic: one made sure a missing record is retried, the other made sure every missing record is recovered instead of only the first.

The audit screen gets plain sentences for both actions: "Login shell access was removed from eos1295user; file sharing was left available." The second half of that sentence is deliberate. Someone reading it should not wonder whether the account stopped working for its actual purpose.

What I checked, and where

The test file for this change is 187 lines, and I also broke the fix on purpose. Setting the shell back to /bin/bash in samba_users.go fails six tests: the four create-path cases, the one that checks the runner call, and the migration test.

On os-dev I had a file-sharing user from earlier work, eos1295user, created while the old code was still live, with bash as its shell. At 4:37 AM, when the box started on a build containing the fix, its shell changed from /bin/bash to /usr/sbin/nologin. The system log shows the usermod line, getent passwd shows the new shell, and su - eos1295user answers "This account is currently not available." The screenshot above is the Audit Log in Settings filtered to that one action. The same user's account was verified again on each later start, which is why the "verified" row appears over and over beneath it in the unfiltered view.

One thing I did not do is add a brand-new file-sharing user through the Shares screen and read its shell afterwards. That path is covered by the create tests, which assert nologin through the runner, but I did not watch it happen in a browser, so I am not claiming I did.

The release

The release notes say it in one sentence: file-sharing accounts no longer get a login shell on the box, and accounts created earlier are switched to no shell when the box starts. It marks v2.3.76 as a security release, which matters because unlicensed boxes receive security fixes the same as licensed ones. A fix like this has no value if it sits behind a purchase.

The same day carried more than this. Recreate on a container now survives a closed browser page and keeps its image name, the Monitoring screen reads a container's disk use from Docker, and a direct publish tells you plainly when it cannot be checked from inside the house. I wrote about none of that here, because the shell fix is the one where the cost of getting it wrong falls on someone who never knew to ask.

The part of this I keep returning to is how small the original mistake was. One flag on one command, copied from a sensible default, and it sat there until I happened to read it next to somebody else's behaviour. The fix is one flag as well. The migration, the ledger check, the audit rows and the retry logic are the work that makes the fix reach people who already installed the old version.