You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Printers are not uninstalled when a user logs out #93
In a Debian installation, printers are not uninstalled when a user logs out.
The reason is that, apparently, the PAM environment only has the environment variable PATH=/bin:/usr/bin when logging out, and therefore lpadmin cannot be found.
@dorianim
That's a good question. In the distributions I maintain, lpadmin is indeed located in /usr/sbin. It would probably be cleaner to either expand the PATH variable when the script is called, or check the standard paths to see where lpadmin is located.
Activity
dorianim commentedon Jul 7, 2026
Is
lpadminguaranteed to always be located at/usr/sbin/lpadminon all platforms?garblixa commentedon Jul 8, 2026
@dorianim
That's a good question. In the distributions I maintain, lpadmin is indeed located in /usr/sbin. It would probably be cleaner to either expand the PATH variable when the script is called, or check the standard paths to see where lpadmin is located.
Security + Fix: validate printer args and use absolute lpadmin/lpstat…
Fix: printers are not uninstalled on logout because lpadmin is not in…
Merge pull request #94 from linuxmuster/feat/lmn74-security-and-compat