[OpenAFS] Check free space on AFS share before login
Wed, 1 Feb 2017 09:42:04 -0500
On Wed, Feb 01, 2017 at 01:07:30PM +0100, Stephan Wiesand wrote:
> nice idea... I should probably implement that here. Something like
> auth required pam_exec.so stdout /bin/check_home_space
> should work well enough at least with lightdm. Just make the script
> print a short message to stdout and exit 1 in the failure case.
You really shouldn't have PAM generate standard output for successful
logins. You will break things like SSH's SFTP.
We do something like this on our RHEL7 workstations, and we have
zenity pop up with a warning when they log in if their home
directory's quota is greater than 95% full. It runs as an script
launched from a .desktop file in /etc/xdg/autostart/.
For console logins, I'd probably use a script in /etc/profile.d/ that
detected that it was a console login and generate all the output to
stderr, just in case. But considering that people don't read the MOTD
I doubt they'd read warnings like that.
Jonathan Billings <email@example.com>