Releases: FreddeITsupport98/Password-less
nopass v6.0
Password-less Script Improvements – Release Notes
Date: 2026‑01‑13
Overview
This release significantly improves the safety, observability, and verification tooling around passwordless behavior in the Password-less project:
- Hardened PAM
nullokdetection to avoid lockouts and false positives. - Removed dangerous automatic password deletion.
- Added unified PAM + SSH empty-password audits.
- Upgraded the standalone
pam-nullok-check.shhelper with richer diagnostics. - Improved documentation to match the new behavior.
1. PAM nullok Detection and Safety
1.1 Smarter can_system_accept_empty_passwords
The main script’s can_system_accept_empty_passwords() now:
- Scans
/etc/pam.donce forauth ... pam_unix(.so)lines. - Ignores commented lines.
- Treats the system as accepting empty passwords only if it finds at least one
auth pam_unix(.so)line that:- Contains bare
nullok, - Does not contain
nullok_secureon the same line, - Is not commented out.
- Contains bare
It does not fail just because nullok_secure exists somewhere else (e.g. /etc/pam.d/login for TTY logins). This avoids false negatives on systems that use nullok_secure for console but nullok for other stacks (such as system-auth, password-auth, or sssd-shadowutils).
1.2 Logging and Summary
verify_empty_password_status (and the helper scripts) now:
- Print each relevant
pam_unixline tagged as either:nullok(empty passwords accepted for that auth stack), ornullok_secure(TTY-only empty passwords).
- Summarize per file where bare
nullokandnullok_secureoccur. - Clearly state whether PAM as a whole appears willing to accept empty passwords.
This makes it much easier to understand which PAM stacks are truly passwordless-capable.
2. Removal of Automatic passwd -d Behavior
2.1 Deprecated --delete-passwd-on-polkit-fail
The previously dangerous option --delete-passwd-on-polkit-fail has been removed from the script’s behavior and from README usage:
- The script no longer calls
passwd -dautomatically under any circumstances. - All flows that used to offer automatic password deletion are now replaced by warnings only.
2.2 New Guidance in maybe_delete_password_for_target_user
The maybe_delete_password_for_target_user() function is now a no-op + explanation:
- It informs the user when polkit JS rules might be unsupported (e.g. polkit ≥ 124 with no JS rules present).
- It explicitly states that the script will:
- Not run
passwd -d. - Not change any Unix password automatically.
- Not run
- It tells users to:
- Use
--verify-pam-nullokand/orpam-nullok-check.shto inspect PAM first. - If they still want an empty Unix password, run
passwd -d <USER>manually, fully understanding the risk.
- Use
3. Unified PAM + SSH Empty-Password Audit
3.1 --verify-pam-nullok → Full Auth Audit
The CLI option --verify-pam-nullok now runs a combined PAM + SSH empty-password audit:
- Internally wired to the new
verify_empty_password_status()function. - No configuration changes are made; this is a read-only audit.
3.2 PAM Side: can_system_accept_empty_passwords
As described above, this function:
- Detects bare
nullok(withoutnullok_secureon the same line). - Interprets the presence of such lines as indication that at least one local login path can accept an empty Unix password.
3.3 SSH Side: check_sshd_config_allows_empty
New helper function:
- Prefers
sshd -Twhere available (and only when run as root) to inspect the effective SSH configuration, includingInclude/Matchhandling. - If
sshd -Tis available:- Returns true if
permitemptypasswords yesappears in the test output. - Returns false if
sshd -Tsucceeds and does not reportpermitemptypasswords yes.
- Returns true if
- Fallback:
- Recursively scans
/etc/ssh/sshd_configand/etc/ssh/sshd_config.d/*.conffor:PermitEmptyPasswords yeson non-comment lines.
- Recursively scans
This ensures the audit sees whether SSH would even consider allowing empty passwords.
3.4 Audit Summary Output
verify_empty_password_status now prints:
-
PAM Status: SAFEorRISK (nullok present). -
SSH Status: SAFEorRISK (PermitEmptyPasswords yes). -
A final interpretation:
- CRITICAL – both PAM and SSH allow empty passwords.
- WARNING – PAM local path allows empty passwords, but SSH blocks them.
- WARNING – SSH allows empty passwords, but PAM appears to reject them.
- RESULT – both look safe (no empty-password path found).
This clarifies the local vs remote exposure in one shot.
4. Standalone Helper: pam-nullok-check.sh
The helper script has been heavily improved:
4.1 PAM Logic
- Single-pass scan of
/etc/pam.dforauth ... pam_unix(.so)lines. - Ignores commented lines.
- Tracks:
nullokwithoutnullok_secure→ local paths that accept empty passwords.nullok_secureanywhere → TTY-only empty passwords.
4.2 SSH Logic
- Checks for SSH server presence and:
- Uses
sshd -Tif available to locatepermitemptypasswords yes. - Falls back to
PermitEmptyPasswords yesgrep insshd_configandsshd_config.d.
- Uses
4.3 Exit-Code Semantics
- Exit code 0 (SAFE) – no bare
nullokin PAM, and noPermitEmptyPasswords yesin SSH. - Exit code 1 (RISK) – at least one of PAM/SSH is capable of operating with empty passwords.
This makes the helper friendlier for CI and security pipelines (0 = clean, 1 = risk).
4.4 Clear User-Facing Messages
The script now explicitly spells out risk:
-
For PAM:
- “PAM RISK: Your system’s PAM configuration includes at least one auth pam_unix(.so) stack that will accept an EMPTY PASSWORD…”
- “This means at least one local login path is technically capable of working with no Unix password set for the account.”
-
For SSH:
- “SSHD RISK: sshd_config is explicitly configured with
PermitEmptyPasswords yes. Remote SSH logins could succeed with an EMPTY PASSWORD if PAM also allows it.”
- “SSHD RISK: sshd_config is explicitly configured with
-
Overall:
- If risk is found:
RISK: Your system is currently CAPABLE of operating with EMPTY PASSWORDS for at least one path (PAM and/or SSH). - If safe:
SAFE: Based on current PAM and SSH configuration, empty Unix passwords should NOT be accepted for logins by default.
- If risk is found:
The helper also prints an extra SUCCESS/FAIL style line with emojis for at-a-glance understanding:
✅ SUCCESS: This system CAN operate password-less for at least one login path...❌ FAIL: This system CANNOT be used without a Unix password by default (which is safer).
5. Internal Flag Cleanup and Naming
Internally:
-
The legacy flag
verify_pam_nullok_onlyhas been renamed to:verify_empty_pw_only=0
-
The
--verify-pam-nullokoption now maps to:--verify-pam-nullok) # Historical name; now runs the combined PAM + SSH empty-password audit. verify_empty_pw_only=1 shift ;;
-
The early-exit block now checks the new internal flag:
if [[ "verify_empty_pw_only" -eq 1 ]] then verify_empty_password_status exit 0 fi
This matches the new semantics while preserving CLI compatibility.
6. README Documentation Updates
The README has been updated to match the new behavior:
-
--verify-pam-nullokis documented as:Historical option name, now wired to a combined PAM + SSH empty-password audit…
-
The “PAM
nullokvsnullok_secureand empty passwords” section now explains:nullokvsnullok_secure.- The heuristic used by
can_system_accept_empty_passwords. - That
--verify-pam-nullok:- Prints all relevant
pam_unixlines. - Summarizes where
nullok/nullok_secureare present. - Inspects SSH for
PermitEmptyPasswords yes. - Produces a final PAM/SSH risk summary.
- Prints all relevant
-
Emphasizes that the script never deletes Unix passwords automatically anymore and that any
passwd -daction must be taken manually after reviewing the audit output.
7. Summary
This release focuses on:
- Safety: No automatic password deletion; better nullok detection; explicit risk messaging.
- Visibility: Clear per-file summaries plus unified PAM + SSH audits.
- Correctness: Single-pass scanning, robust regex, and
sshd -Tintegration for accurate SSH interpretation. - Documentation: README and comments now accurately describe the improved behavior.
These changes make it much harder to accidentally lock yourself out or misinterpret the system’s ability to operate without passwords, while giving you powerful tools to audit and understand your auth stack.
nopass v5.1
more robust update. No changes funtionality!
nopass v5.0
Password-less Release Notes
Date: 2026-01-12
Overview
This release focuses on experimental desktop integration features and much stronger safety warnings around dangerous modes. It is still intended only for single-user, non-critical machines where you fully accept the risks.
New: Root Desktop Unlock (Experimental)
--root-unlock
Status: Experimental, KDE/Plasma + PipeWire focused, NOT recommended for normal use.
This standalone mode tweaks only the root account and then exits without touching normal passwordless sudo / polkit for your regular user. It is meant for cases where you insist on running an entire KDE session as root and still want working audio.
What it does in this mode:
- Ensures the
rootaccount is a member of several desktop / device groups (e.g.audio,video,input,render,tty, etc.) so a root GUI session can see ALSA/PipeWire devices. - Updates
/etc/pulse/client.confso that both of the following are enforced:autospawn = yesallow-autospawn-for-root = yes
- Optionally un-mutes ALSA Master/PCM mixer controls using
amixerand then persists the mixer state withalsactl store. - Bridges root audio to the normal user’s PipeWire/PulseAudio server by exporting:
PULSE_SERVER=unix:/run/user/<UID>/pulse/nativeXDG_RUNTIME_DIR=/run/user/0DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/0/bus
into the following files if present (or created):/root/.bashrc/root/.profile/root/.zshrc
- Detects if the root account appears locked in
/etc/shadow(password field begins with!or*) and, only after explicit confirmation, attempts to unlock it via:sudo passwd -u root
A small state file is written at:
/etc/passwordless-fb-root-unlock.state
for use by the restore command.
Important:
- This has been designed and tested primarily on KDE Plasma + PipeWire.
- GNOME, XFCE, Hyprland, and other environments are not tested and may behave differently or break.
- Using
--root-unlockimplies you are comfortable running a full root GUI session and accept all associated security risks.
--root-unlock-restore
Companion command to undo as much of the above as possible. It uses the state file and timestamped backups created by --root-unlock.
What it attempts to restore:
/etc/pulse/client.conffrom the latest.bak.<timestamp>backup./root/.config/pulse,/root/.config/pipewire, and/root/.local/state/wireplumberfrom the latest*.bak.<timestamp>directories.- The previous
lingerstate for root (enabled/disabled) and the priorpulseaudio.serviceenable/active state. - Removal of the injected environment exports (and their comments) from:
/root/.bashrc/root/.profile/root/.zshrc
- Removal of any groups that
--root-unlockrecorded as newly added for root.
This is a best-effort undo, not a hard guarantee. If the state file or backups are missing or corrupted, some changes may not be fully reverted.
New: Root Account Lock Detection and Optional Unlock
In --root-unlock mode the script now:
- Reads root’s password field from
/etc/shadow. - Treats a leading
!or*as a locked account. - If locked, prints clear warnings and prompts you whether to unlock.
- Only runs
sudo passwd -u rootwhen you explicitly confirm (or when--yesis set). - Does nothing in
--dry-runbeyond logging what it would attempt.
This is intended to make it easier to log into a root GUI session when the distribution ships with a locked root account, while still requiring an explicit, informed decision.
Hardened: --full-file-permissions (EXPERIMENTAL, NOT READY FOR USE)
The --full-file-permissions mode is now clearly marked as experimental and not ready for normal use.
Behavior:
-
Skips the normal passwordless sudo / polkit / group / PAM configuration and runs only a recursive ACL grant equivalent to:
setfacl -R -m u:<TARGET_USER>:rwx /
-
Uses
find+setfaclwith exclusions for pseudo-filesystems and some network/service directories to reduce the chance of catastrophic breakage. -
Shows detailed progress via
pv, and a small sample ofsetfaclerror messages at the end.
Additional warnings added in this release:
-
Every time
--full-file-permissionsis used, the script prints multiple high-visibility warnings:- It is an experimental feature, work in progress.
- It will attempt to grant rwx ACLs on most of
/. - It is very likely to permanently break your system (networking, display, services, etc.).
- It should only be used on throwaway test installs with offline backups, and by users who intentionally want to stress or break the system.
-
The README now explicitly states that this mode is for experimentation only and that you should expect to need a full reinstall or offline repair after serious use.
Other Improvements
- Stronger, clearer runtime warnings for:
--root-unlock--root-unlock-restore--full-file-permissions
- Extended environment bridging for root shells across:
/root/.bashrc/root/.profile/root/.zshrc(if present)
- More robust state-file writing for
--root-unlockso that multi-linesystemctldiagnostics cannot corrupt the state file.
Known Limitations
--root-unlockis only tested on openSUSE Tumbleweed + KDE Plasma + PipeWire in a single-user configuration.- GNOME, XFCE, Hyprland, and other desktops are not tested. Audio, login flows, or session services may break.
--full-file-permissionsremains an experimental feature: treat it as a destructive testing tool, not a supported configuration step.
Final Notes
This project remains targeted at advanced users who are comfortable reading shell scripts, understand Linux permissions and ACLs, and are willing to accept the risk of data loss and system breakage.
If you are unsure whether you should use any of these new options, you probably should not use them yet.
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.
-----------------------------------------...
nopass v3
Password-less – Release Notes
Unversioned changes (latest)
Script: setup-passwordless-fb.sh
- Improved PAM
suintegration for passwordlesssuvia thewheelgroup:- Locates
su/su-lPAM configs in/etc/pam.dor vendor files in/usr/lib/pam.dand creates local overrides when needed. - If a
pam_wheel.soline already exists, only adds thetrustoption (without duplicating the line). - If no
pam_wheel.soline exists, injects a single
auth sufficient pam_wheel.so use_uid trust group=wheel
line either immediately after thepam_rootok.soauth line (preferred) or near the top of the file as a fallback. - Changes are idempotent: re-running the script does not keep adding extra
pam_wheel.solines ortrustflags.
- Locates
- Tightened polkit detection for newer versions (e.g. polkit-1 124+):
- Uses
pkaction --versionto detect newer polkit. - Scans common rules directories for existing JS
.rulesfiles containingpolkit.addRule; if none are found, treats JS rules as "maybe unsupported".
- Uses
- Added optional
--delete-passwd-on-polkit-failflag:- When JS rules look unsupported, and this flag is set, the script can offer to delete the local Unix password for the target user via
sudo passwd -d <TARGET_USER>(with confirmation and full support for--dry-run).
- When JS rules look unsupported, and this flag is set, the script can offer to delete the local Unix password for the target user via
- Verified the script passes a basic syntax check (
bash -n).
Documentation: README.md
- Added a section “Why passwordless sudo / su and what this script is for” explaining the intended use case (single-user personal/lab machines, convenience over isolation, reproducible config).
- Expanded the feature and options sections to document:
- PAM
supasswordless behavior forwheelmembers and its idempotent, cross-distro design. - The
--delete-passwd-on-polkit-failflag and how it interacts with polkit detection. - The tightened polkit JS detection heuristics (version check + scan for existing JS rules).
- PAM
These notes describe the current state after the latest edits to the script and README.
nopass v2.1
v2.1 – Experimental --full-file-permissions option
This release introduces an extremely dangerous, opt‑in capability to grant a single user full read/write/execute ACLs across the entire filesystem, alongside existing passwordless sudo/polkit configuration.
New
--full-file-permissionsflag- When enabled, the script will (after extra confirmation) run:
sudo setfacl -R -m u:<TARGET_USER>:rwx /
- When enabled, the script will (after extra confirmation) run:
give me realise note
Here’s a concise release note you can use, e.g. for vX.Y.Z:
Password-less setup-passwordless-fb.sh – Release Notes
New features
-
--all-groupsflag (extremely dangerous)- New opt-in flag
--all-groupsthat:- Enumerates every group on the system via
getent group. - Adds the target user to all groups they are not already a member of.
- Enumerates every group on the system via
- This nearly eliminates all group-based security boundaries between the user and:
- System services and daemons.
- Device nodes (disks, video, audio, input, etc.).
- Logs, sockets, and various service data.
- Fully documented in the README and clearly marked as extremely dangerous.
- New opt-in flag
-
Expanded curated privileged group set
- In normal mode (without
--all-groups), the script now ensures the target user is in a broader set of powerful groups, if they exist:root,disk,wheel,systemd-journal,network,video,audio,input,render,kvm,tty,tape,shadow,kmem,adm.
- The script checks each group with
getent groupand only attempts to add the user if the group is present on the system. - Re-running the script after installing additional packages/groups will add the user to any newly-present groups from this list.
- In normal mode (without
Documentation and warning updates
-
Mandatory reading disclaimer
- Added a strong statement that users must read the entire README, including all warnings and option descriptions, before running the script.
- Explicitly states that running the script without understanding it makes any damage or compromise entirely the user’s responsibility.
-
High-risk behavior section
- New “High‑risk behaviors and options (read this first)” section near the top of the README that:
- Lists all powerful groups the script can add the user to.
- Explains that the script only adds the user to groups that actually exist, but will include new ones if they appear later and the script is re-run.
- Summarizes dangerous options:
--relax-mac(weakens AppArmor/SELinux).--full-file-permissions(recursive ACLu:<TARGET_USER>:rwx /).--all-groups(member of every group).
- New “High‑risk behaviors and options (read this first)” section near the top of the README that:
-
--all-groupsoption docs- Detailed description of
--all-groupsin the Options section:- Clarifies that it uses
getent group. - Emphasizes that it effectively turns the user into a “member of everything” and that reinstalling the system may be the only safe rollback if something breaks.
- Clarifies that it uses
- Detailed description of
Internal / safety checks
-
Group existence checks
- For the curated list of privileged groups, the script now uses
getent groupto verify that a group exists before callingusermod -aG. - Avoids errors on distributions where some of these groups are not defined.
- For the curated list of privileged groups, the script now uses
-
Syntax validation
- Script validated with
bash -nafter changes to ensure there are no syntax errors.
- Script validated with
nopass v2.0
# v2.0 – Stronger Warnings, Group Changes, and Docs Update
## ⚠️ Critical Security & Warranty Warning
This script is a **dangerous** convenience tool. It is intended only for advanced users who fully understand the risks.
- It can give the target user **root-equivalent power with no password**.
- It may add the user to highly privileged groups such as `root`, `disk`, `shadow`, and `kmem`.
- With these privileges, the user (or any process running as that user) can:
- Run **any command as root** via `sudo` without a password.
- Bypass many desktop/admin prompts via **polkit auto-approval**.
- Access **raw disks**, kernel interfaces, and **sensitive files** (including password hashes) even *without* `sudo`.
**If this account is ever compromised, you should assume full system compromise.**
This project and release are provided **“AS IS”**, **without any warranty** of any kind.
I am the original author of the script** and make **no guarantees** about:
- Security
- Correctness
- Fitness for any particular purpose
- Suitability for your environment
By downloading, installing, or running this script, **you accept all risk**, including but not limited to:
- Data loss or corruption
- Security breaches and privilege escalation
- Service outages or downtime
- Violations of policies, contracts, or laws in your environment
If you do **not** fully understand or accept these risks, **do not install or run this script**.
---
## What’s New in This Release
### 1. Group Membership Changes
The script now, when configuring a user (not in `--restore` or `--verify-only` modes), attempts to ensure the target user is a member of several privileged groups:
- `root`
- `disk`
- `shadow`
- `kmem`
This is done via `usermod -aG <group> <user>` and is **idempotent** (it will not re-add if already present).
**Implications:**
- `disk`: potential access to raw block devices → can read/write disks directly.
- `shadow`: potential access to `/etc/shadow` → password hashes, credential material.
- `kmem` (where present): potential access to low-level kernel memory interfaces.
These additions **further increase** the power and risk of the target account.
Use **only** on machines where this is acceptable and understood.
## v2.0 – Optional AppArmor/SELinux Relaxation
- Added a new **optional** flag `--relax-mac`:
- Best-effort stops the **AppArmor** service at runtime (if present).
- Best-effort sets **SELinux** to **permissive** at runtime (if present).
- Always logs what it’s doing and still prompts for confirmation unless `--yes` is used.
- By default, **nothing changes** for AppArmor/SELinux; you must explicitly pass `--relax-mac`.
- This does not change UIDs, groups, or sudoers, but it **removes important security enforcement layers**
- and makes any existing privileges more powerful. Use only if you fully understand and accept the risk.
## v2.0 – Optional AppArmor/SELinux Relaxation + MAC Status in Verify
- Added a new **optional** flag `--relax-mac`:
- Best-effort stops the **AppArmor** service at runtime (if present).
- Best-effort sets **SELinux** to **permissive** at runtime (if present).
- Always logs what it’s doing and still prompts for confirmation unless `--yes` is used.
- `--verify` mode now also prints a **MAC status summary** (AppArmor present/active, SELinux mode).
No MAC changes are ever made in verify-only mode; it’s informational only.
- As before, this does not change UIDs, groups, or sudoers, but **relaxing MAC reduces system security** and makes any existing privileges more powerful. Use only if you fully understand and accept the risk.
### 2. Expanded README Security Section
`readme.md` has been updated with:
- Explicit **security warnings** and a **legal/warranty disclaimer**.
- Clear statements that:
- The script can fully subvert normal protections like `sudo` prompts.
- The user must assume full compromise if the target account is abused.
- Practical guidance on safer usage:
- Restricting this to **single-user, non-critical systems**.
- Being careful with **SSH/remote access**.
- Using **strong login passwords** and, where possible, full disk encryption.
- Avoiding execution of random/untrusted code under this powerful account.
- Keeping backups of `/etc/sudoers`, `/etc/sudoers.d`, and polkit rules.
### 3. Documentation Clarifications
- Clarified what the script actually does with:
- `/etc/sudoers.d/<user>-passwordless`
- `/etc/sudoers`
- `/etc/polkit-1/rules.d/00-allow-<user>-everything.rules`
- Emphasized that the script is **idempotent** and uses `visudo` checks and backups (when `--force` is used).
---
## Installation Warning
Before installing or running this version:
1. **Review the code** yourself.
Do not run any script you have not personally inspected and understood.
2. **Read the README security section carefully.**
If anything there is unclear, **stop** and do not use the script.
3. **Back up your configuration:**
- `/etc/sudoers`
- `/etc/sudoers.d/`
- `/etc/polkit-1/rules.d/`
4. **Test in a disposable environment first** (VM, test machine).
Verify behavior and recovery before applying to anything you care about.
---
## How to Install (If You Accept the Risks)
```bash
git clone https://github.com/<your-username>/Password-less.git
cd Password-less
chmod +x setup-passwordless-fb.shThen run, for example (for the current user):
./setup-passwordless-fb.sh --yes --forceOr sudo-only, no polkit:
./setup-passwordless-fb.sh --sudo-only --yes --forceAgain: If you are not 100% sure what this does, do not install or run it.
If you tell me your intended version number and repo URL, I can customize the header and commands exactly for your release.
nopass v1.0
This script safely configures passwordless sudo (and optionally polkit) for a single Linux user. It creates a dedicated sudoers.d drop-in and can also add a matching NOPASSWD line to /etc/sudoers, always validating changes with visudo and creating timestamped backups. The script is idempotent (re-runs don’t duplicate lines), supports multiple distros/package managers, and includes convenient modes to restore from backups and to verify that passwordless sudo/polkit are working without making further changes.