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:
@@ -29,7 +29,14 @@ ACTUAL_GID="$(id -g "$ACTUAL_USER")"
|
||||
ensure_packages() {
|
||||
local pkgs=()
|
||||
case "$1" in
|
||||
smb) command -v mount.cifs &>/dev/null || pkgs+=(cifs-utils) ;;
|
||||
smb)
|
||||
command -v mount.cifs &>/dev/null || pkgs+=(cifs-utils)
|
||||
# keyutils explicitly, not left to cifs-utils' Recommends — on
|
||||
# images with install-recommends disabled, missing keyutils
|
||||
# makes every mount.cifs call fail with "mount error(79): Can
|
||||
# not access a needed shared library" regardless of credentials.
|
||||
dpkg -s keyutils &>/dev/null || pkgs+=(keyutils)
|
||||
;;
|
||||
nfs) command -v mount.nfs &>/dev/null || pkgs+=(nfs-common) ;;
|
||||
esac
|
||||
if [[ ${#pkgs[@]} -gt 0 ]]; then
|
||||
|
||||
Reference in New Issue
Block a user