Fix CIFS mount error(79) caused by missing keyutils package

Errno 79 is ELIBACC ("Can not access a needed shared library"), not
ENOKEY as previously assumed — mount.cifs prints glibc's literal
strerror() text for it. It recurred with valid, correctly-captured
credentials because the real cause was never authentication: cifs-utils
hard-depends on the libkeyutils1 library but only Recommends the
keyutils package itself, which ships /sbin/request-key and the
/etc/request-key.d/*.conf handlers the kernel's upcall path invokes.
Minimal cloud VPS images commonly disable install-recommends, so
`apt-get install cifs-utils` alone silently skips it and every mount —
guest or fully credentialed — fails identically.

Install keyutils explicitly wherever cifs-utils is installed:
services/base.sh's unconditional package list, vpn-data-mount.sh's
lazy install-on-mount path, and tools/mount-network-drive.sh's SMB
branch.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H4k6J1qXXyYxhGEgnJaMvn
This commit is contained in:
Claude
2026-08-10 20:00:24 +00:00
parent 1c1fa32b6f
commit 2d9501a56c
3 changed files with 39 additions and 10 deletions
+8 -3
View File
@@ -27,14 +27,19 @@ install_base() {
run_cmd apt-get update -y
# Core utilities present on every install. cifs-utils here (not lazily
# installed on first use, the way tools/mount-network-drive.sh and
# Core utilities present on every install. cifs-utils/keyutils here (not
# lazily installed on first use, the way tools/mount-network-drive.sh and
# vpn-data-mount.sh's own local-mount step would otherwise do it) so SMB
# mounts work immediately whenever they're set up later, same reasoning
# as Docker/Compose being unconditional here instead of on-demand.
# keyutils explicitly, not left to cifs-utils' Recommends — some minimal
# cloud VPS images disable install-recommends, and without keyutils'
# /etc/request-key.d handlers every mount.cifs call (guest or fully
# credentialed) fails with "mount error(79): Can not access a needed
# shared library" regardless of the password being correct.
run_cmd apt-get install -y \
net-tools ncdu git curl wget htop btop tree zip unzip \
ca-certificates gnupg jq rsync ssh-import-id cifs-utils \
ca-certificates gnupg jq rsync ssh-import-id cifs-utils keyutils \
|| log_warning "Some essential packages failed to install"
# glow — terminal markdown reader (charmbracelet). Not in Ubuntu repos,