PAM_SNAPPER(8)
π PAM_SNAPPER(8) π
Filesystem Snapshot Management β bestie edition β¨
okay so real talk, pam_snapper is the manual page for a PAM module, and it's lowkey one of the cutest little utilities out there. it's giving "your filesystem but it remembers where you were before you broke everything" energy. let's get into it π«Ά
β¨ NAME β¨
pam_snapper β a PAM module which creates filesystem snapshots via "snapper" πΈ
π SYNOPSIS π
pam_snapper.so [debug] [homeprefix=prefix] [ignoreservices=services]
[ignoreusers=users] [rootasroot] [ignoreroot] [openonly]
[closeonly] [cleanup=algorithm]
π¦ DESCRIPTION π¦
Create a snapshot at every login of a user, thus they always have a save starting point. πΎβ¨
ngl that's literally the whole vibe. every time you log in, boom, snapshot. you always have a restore point and you didn't even have to think about it. main character energy fr.
As many users do not logout for some time, it is a good idea to enable snapper's time based snapshots in addition. β°
π OPTIONS π
debugβ Switch on debugging in the module. π turn this on when you wanna see what's actually happening in there, iykyk.homeprefix=prefixβ Prefix for the name of the snapper configuration. The username will be appended to this prefix. so like, prefix + username = the config name, periodt. Default:"home_"ignoreservices=comma separated list of servicesβ services that get skipped, comma separated bestie. Default:"crond"ignoreusers=comma separated list of usersβ users that get skipped, also comma separated. Default: (none)rootasrootβ Perform a snapshot using the snapper configuration"root"if the user"root"logs in. In other words: the homeprefix is not used in this case. As the snapper configuration"root"is used for the system (the root filesystem), this means that with every login of the user"root"the complete"/"filesystem will be snapshotted. This can be useful to help administrators rolling back in case their activity / configuration changes have been accidentally wrong. π this one is kind of a big deal β the WHOLE/filesystem, every single root login. iconic but also π
"rootasroot"and"ignoreroot"are mutually exclusive. pick one, you cannot have both.
ignorerootβ No snapshot is taken, if the user"root"opens/closes a session. π root gets left alone entirely.
"rootasroot"and"ignoreroot"are mutually exclusive. again β one or the other, no both.
openonlyβ Only create a single snapshot when opening the PAM session. one and done on the way in. πͺβ¨ Default: create pre- and post-snapshotscloseonlyβ Only create a single snapshot when closing the PAM session. one and done on the way out. πͺπ¨ Default: create pre- and post-snapshotscleanup=cleanup-algorithmβ Set snapper cleanup algorithm. π§Ή Default: (none)
π MODULE TYPES PROVIDED π
Only the module type "session" is provided. that's it. that's the whole list. one (1) module type. slay. π
π RETURN VALUES π
PAM_SUCCESSβpam_snapperwill always returnPAM_SUCCESS, to not prevent users from login, in case a snapshot fails. This may change in the future.
so yeah, it never blocks you out, even if the snapshot flops. very forgiving of it honestly. π«Ά (but heads up, that behaviour may change in the future β noted.)
π EXAMPLES π
Basic usage
- Create a btrfs subvolume for the new user and a snapper configuration, e.g. using the tool
/usr/lib/pam_snapper/pam_snapper_useradd.sh. π οΈ - Add the following line to
/etc/pam.d/common-session:
session optional pam_snapper.so
and that's literally it bestie. boom. snapshots. β¨
π₯ SEE ALSO π₯
snapper(8), pam.conf(5), pam(8), pam_snapper_homeconvert, pam_snapper_pamconfig, pam_snapper_useradd, pam_snapper_userdel
π§ HOMEPAGE π§
π AUTHORS π
pam-snapper was written by Matthias G. Eckermann <mge@suse.com> as part of SUSE Hackweek#9 in April 2013. βοΈ
This module would not have been possible without the work of Arvin Schnell on the snapper project. pam-snapper inherits DBUS handling from "snapper_dbus_cli.c" by David Disseldorp. π
The module builds on the Linux PAM stack and its documentation, written by Thorsten Kukuk. π
β LICENSE β
Copyright (c) 2013 SUSE
All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the terms of version 2 of the GNU General Public License as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, contact SUSE.
To contact SUSE about this file by physical or electronic mail, you may find current contact information at www.suse.com. π
and that's a wrap!! this page is version 0.13.0, dated 2013-05-23, brought to you by the fine folks behind PAM_SNAPPER(8) in Filesystem Snapshot Management. go forth and snapshot responsibly bestie πβ¨π
π¦ where this page comes from
- epel 10: pam_snapper 0.13.0-3.el10_3 Β· GPL-2.0-only
- fedora 44: pam_snapper 0.13.0-3.fc44 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms