Repository navigation
nopass v4.0
Password-less – Release (2026-01-10)
This release captures all recent work on setup-passwordless-fb.sh, focusing on:
- safer, more transparent handling of the extremely dangerous
--full-file-permissionsmode - better progress and error visibility during ACL application
- a periodic systemd service/timer for re-applying full ACLs
- GUI/desktop integration and safer behavior on modern distros
- CLI and Options
New/updated flags:
-
--full-file-permissions- Nuclear option that runs a recursive ACL grant equivalent to:
setfacl -R -m u:<TARGET_USER>:rwx /
- Now wrapped with:
- multiple warnings and explicit confirmation prompts
pv-based progress display with total item count and items/sec- a concise post-run summary including elapsed time and approximate throughput
- compact sampling of ACL errors instead of a wall of stderr
- Nuclear option that runs a recursive ACL grant equivalent to:
-
--install-full-file-permissions-service- Installs a systemd service + timer (
passwordless-fb-fullacl.service/passwordless-fb-fullacl.timer) that periodically re-applies--full-file-permissions. - When invoked by itself, the script enters an installer-only mode:
- asks for confirmation
- writes or reuses
/etc/passwordless-fb-fullacl.conf - generates service + timer units
- runs
systemctl daemon-reloadandsystemctl enable --now passwordless-fb-fullacl.timer - exits without touching sudoers, polkit, groups, or anything else
- Installs a systemd service + timer (
-
--uninstall-full-file-permissions-service- Uninstalls the periodic ACL service and timer.
- When invoked by itself, runs in an uninstaller-only mode:
- asks for confirmation
- disables and stops the timer if present
- removes the
.service,.timer, and/etc/passwordless-fb-fullacl.conf - runs
systemctl daemon-reload - exits without modifying sudoers, polkit, or other configuration
Other options and behavior (passwordless sudo, polkit integration, --relax-mac, --all-groups, --delete-passwd-on-polkit-fail, --restore, --verify-only) remain as described in the README, but have been re-documented more thoroughly.
- Full-file-permissions ACL Engine Improvements
The --full-file-permissions logic has been heavily refined:
-
Dependency handling
- When
--full-file-permissionsor the full-ACL systemd service is requested andpvis missing, the script now treatspvas a dependency and installs it via the detected package manager (e.g.zypper,dnf,apt, etc.), unless--no-installis supplied.
- When
-
Progress bar and throughput
- Before running
setfacl, the script counts how many filesystem entries will be processed:- prints
[info] Found N items. Starting ACL application with progress bar...
- prints
- Uses
pv -lto show a live progress bar with:- current / total items
- percentage
- approximate items/sec
- ETA
- Measures elapsed time and prints a human-readable summary, e.g.:
[info] Successfully applied ACLs to approximately 234882 items in 42s (~5592 items/sec).
- Before running
-
Error capture and sampling
setfaclstderr is piped through a small filter and also tee’d to a temporary log.- Rather than dumping every error line, the script now:
- extracts unique messages
- prints up to 5 as
[acl-error] ...so the user can see the types of failures (e.g. read‑only filesystems, unsupported ACLs, missing paths), without being overwhelmed.
- This maintains visibility into problems while avoiding an unreadable wall of output.
-
Non-fatal behavior
- Even when some paths fail (common on
/proc,/sys, read‑only mounts, etc.), the script:- records that ACL application had errors
- surfaces a clear warning and the sample of error lines
- continues with the rest of the script instead of bailing out mid-run
- Even when some paths fail (common on
- Desktop Notifications and UX
For --full-file-permissions runs (both interactive and via the systemd service), the script now provides optional desktop notifications when notify-send and a graphical session are available:
-
Start notification
- e.g. "Applying recursive ACLs on / for . This may take a while and can affect many files."
-
Finish notification
- On success: "ACL application on / for is complete. Full-file-permissions are now in effect."
- On error: "ACL application on / for finished with some errors. Check terminal output if you care about 100% coverage."
The script makes a best-effort attempt to target the user’s D-Bus session bus when running as root (e.g. under systemd). If there is no GUI or notify-send is missing, notifications are quietly skipped.
- Systemd Service + Timer (
passwordless-fb-fullacl)
A new systemd-based mechanism allows re-applying full ACLs on a schedule.
-
Configuration file:
/etc/passwordless-fb-fullacl.confACL_TARGET_USER:- user that should receive full-file-permissions ACLs
- defaults to the invoking user at install time if not explicitly set
ACL_EXTRA_ARGS:- extra arguments passed to
setup-passwordless-fb.shwhen run from the service - defaults to
--sudo-only --no-install --yes
- extra arguments passed to
ACL_ONCALENDAR:- systemd
OnCalendar=expression controlling the schedule - defaults to
daily, but can be set tohourly,Mon..Fri 02:00, etc.
- systemd
-
Service unit:
passwordless-fb-fullacl.service- One-shot unit that runs the script approximately as:
ExecStart=/usr/bin/env bash /path/to/setup-passwordless-fb.sh --user <resolved-target> --full-file-permissions ${ACL_EXTRA_ARGS}
- The
<resolved-target>username is baked into the unit at install time to avoidset -uissues with unset environment variables.
- One-shot unit that runs the script approximately as:
-
Timer unit:
passwordless-fb-fullacl.timer- Triggers the service according to
ACL_ONCALENDAR. - Enabled/started by the installer mode when
--install-full-file-permissions-serviceis used on its own.
- Triggers the service according to
-
Exclusive install/uninstall paths
--install-full-file-permissions-servicealone:- confirmation -> write/reuse env file -> write units -> daemon-reload -> enable/now -> exit.
--uninstall-full-file-permissions-servicealone:- confirmation -> disable/stop timer -> remove units + env -> daemon-reload -> exit.
- KDE and PAM Integration
-
KDE
kdesuintegration- On KDE/Plasma systems with
kwriteconfig5, the script setskdesuto usesudoinstead ofsu:kwriteconfig5 --file kdesurc --group super-user-command --key super-user-command sudo
- This makes graphical "Run as root" dialogs follow the same passwordless sudo configuration as the terminal.
- On KDE/Plasma systems with
-
PAM
suforwheelusers- If a PAM
su/su-lservice exists (or a vendor file is present that can be copied into/etc/pam.d), the script:- ensures a
pam_wheel.soline exists withtrustandgroup=wheel - makes
supasswordless for users in thewheelgroup - does so in an idempotent, cross‑distro‑friendly way, with backups when overwriting
- ensures a
- If a PAM
- Safety, Idempotency, and Uninstall Notes
-
Safety checks
- Refuses to target
rootas the passwordless user. - Always uses
visudoto validate sudoers fragments and the final/etc/sudoers. - Backs up key files (sudoers, polkit rules, PAM configs) with timestamped
.bak.*suffixes when--forceis used.
- Refuses to target
-
Idempotency
- Re-running the script:
- does not re-add duplicate sudoers or PAM lines
- skips rewriting sudoers/polkit configs when they already match the desired content
- recognizes its own comments/markers and avoids stacking changes.
- Re-running the script:
-
Undo/rollback
- Normal sudo/polkit/PAM changes can be reverted using:
- removal of sudoers drop-ins
visudoedits and the.bak.*backups- removal of polkit
.rulesfiles
--full-file-permissionsACLs remain inherently hard to fully undo; in many cases, a reinstall is the only truly clean revert.
- Normal sudo/polkit/PAM changes can be reverted using:
- Documentation
README.md has been fully updated to match this release. It now includes:
- Detailed descriptions of all options, including
--full-file-permissions, the systemd service installer/uninstaller, and the polkit/MAC-related flags. - A long, explicit warning section explaining why
--full-file-permissionsis effectively a filesystem-wide superuser grant and why it is so difficult to revert. - Examples for:
- basic passwordless sudo setup
- sudo + polkit configuration
- dry-run preview mode
- installing/uninstalling the full-ACL systemd service
- Notes on desktop integration (KDE
kdesu, PAMsuforwheel) and the newpv/notification-based UX for full-ACL runs.
- Final Notes
This release continues to assume the same philosophy as before:
- This script is for single-user, non-critical systems where convenience is prioritized over strict isolation.
--full-file-permissionsand its systemd service remain extremely dangerous and should only be used by people who fully understand the consequences and are willing to rebuild their system if needed.
If in doubt, stick to --sudo-only and avoid --full-file-permissions entirely.