diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 14:22:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 14:22:51 +0000 |
commit | 9ada0093e92388590c7368600ca4e9e3e376f0d0 (patch) | |
tree | a56fe41110023676d7082028cbaa47ca4b6e6164 /modules/pam_setquota/pam_setquota.8 | |
parent | Initial commit. (diff) | |
download | pam-9ada0093e92388590c7368600ca4e9e3e376f0d0.tar.xz pam-9ada0093e92388590c7368600ca4e9e3e376f0d0.zip |
Adding upstream version 1.5.2.upstream/1.5.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | modules/pam_setquota/pam_setquota.8 | 186 | ||||
-rw-r--r-- | modules/pam_setquota/pam_setquota.8.xml | 301 |
2 files changed, 487 insertions, 0 deletions
diff --git a/modules/pam_setquota/pam_setquota.8 b/modules/pam_setquota/pam_setquota.8 new file mode 100644 index 0000000..f09ba96 --- /dev/null +++ b/modules/pam_setquota/pam_setquota.8 @@ -0,0 +1,186 @@ +'\" t +.\" Title: pam_setquota +.\" Author: [see the "AUTHOR" section] +.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> +.\" Date: 09/03/2021 +.\" Manual: Linux-PAM Manual +.\" Source: Linux-PAM Manual +.\" Language: English +.\" +.TH "PAM_SETQUOTA" "8" "09/03/2021" "Linux-PAM Manual" "Linux\-PAM Manual" +.\" ----------------------------------------------------------------- +.\" * Define some portability stuff +.\" ----------------------------------------------------------------- +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.\" http://bugs.debian.org/507673 +.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html +.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" ----------------------------------------------------------------- +.\" * set default formatting +.\" ----------------------------------------------------------------- +.\" disable hyphenation +.nh +.\" disable justification (adjust text to left margin only) +.ad l +.\" ----------------------------------------------------------------- +.\" * MAIN CONTENT STARTS HERE * +.\" ----------------------------------------------------------------- +.SH "NAME" +pam_setquota \- PAM module to set or modify disk quotas on session start +.SH "SYNOPSIS" +.HP \w'\fBpam_setquota\&.so\fR\ 'u +\fBpam_setquota\&.so\fR [fs=\fI/home\fR] [overwrite=\fI0\fR] [debug=\fI0\fR] [startuid=\fI1000\fR] [enduid=\fI0\fR] [bsoftlimit=\fI19000\fR] [bhardlimit=\fI20000\fR] [isoftlimit=\fI3000\fR] [ihardlimit=\fI4000\fR] +.SH "DESCRIPTION" +.PP +pam_setquota is a PAM module to set or modify a disk quota at session start +.PP +This makes quotas usable with central user databases, such as MySQL or LDAP\&. +.SH "OPTIONS" +.PP +.PP +\fBfs=\fR\fB\fI/home\fR\fR +.RS 4 +The device file or mountpoint the policy applies to\&. Defaults to the filesystem containing the users home directory\&. +.RE +.PP +\fBoverwrite=\fR\fB\fI0\fR\fR +.RS 4 +Overwrite an existing quota\&. Note: Enabling this will remove the ability for the admin to manually configure different quotas for users for a filesystem with +\fBedquota\fR(8)\&. (Defaults to 0) +.RE +.PP +\fBdebug=\fR\fB\fI0\fR\fR +.RS 4 +Enable debugging\&. A value of 1 outputs the old and new quota on a device\&. A value of 2 also prints out the matched and found filesystems should +\fBfs\fR +be unset\&. (Defaults to 0) +.RE +.PP +\fBstartuid=\fR\fB\fI1000\fR\fR +.RS 4 +Describe the start of the UID range the policy is applied to\&. (Defaults to UID_MIN from login\&.defs or the uidmin value defined at compile\-time if UID_MIN is undefined\&.) +.RE +.PP +\fBenduid=\fR\fB\fI0\fR\fR +.RS 4 +Describe the end of the UID range the policy is applied to\&. Setting +\fIenduid=0\fR +results in an open\-ended UID range (i\&.e\&. all uids greater than +\fBstartuid\fR +are included)\&. (Defaults to 0) +.RE +.PP +\fBbsoftlimit=\fR\fB\fI19000\fR\fR +.RS 4 +Soft limit for disk quota blocks, as defined by +\fBquotactl\fR(2)\&. Note: +\fBbsoftlimit\fR +and +\fBbhardlimit\fR +\fImust\fR +be set at the same time! +.RE +.PP +\fBbhardlimit=\fR\fB\fI20000\fR\fR +.RS 4 +Hard limit for disk quota blocks, as defined by +\fBquotactl\fR(2)\&. Note: +\fBbsoftlimit\fR +and +\fBbhardlimit\fR +\fImust\fR +be set at the same time! +.RE +.PP +\fBisoftlimit=\fR\fB\fI3000\fR\fR +.RS 4 +Soft limit for inodes, as defined by +\fB quotactl\fR(2)\&. Note: +\fBisoftlimit\fR +and +\fBihardlimit\fR +\fImust\fR +be set at the same time! +.RE +.PP +\fBihardlimit=\fR\fB\fI4000\fR\fR +.RS 4 +Hard limit for inodes, as defined by +\fB quotactl\fR(2)\&. Note: +\fBisoftlimit\fR +and +\fBihardlimit\fR +\fImust\fR +be set at the same time! +.RE +.SH "MODULE TYPES PROVIDED" +.PP +Only the +\fBsession\fR +module type is provided\&. +.SH "RETURN VALUES" +.PP +.PP +PAM_SUCCESS +.RS 4 +The quota was set successfully\&. +.RE +.PP +PAM_IGNORE +.RS 4 +No action was taken because either the UID of the user was outside of the specified range, a quota already existed and +\fBoverwrite=1\fR +was not configured or no limits were configured at all\&. +.RE +.PP +PAM_USER_UNKNOWN +.RS 4 +The user was not found\&. +.RE +.PP +PAM_PERM_DENIED +.RS 4 +/proc/mounts +could not be opened\&. +.sp +The filesystem or device specified was not found\&. +.sp +The limits for the user could not be retrieved\&. See syslog for more information\&. +.sp +The limits for the user could not be set\&. See syslog for more information\&. +.sp +Either +\fBisoftlimit\fR/\fBihardlimit\fR +or +\fBbsoftlimit\fR/\fBbhardlimit\fR +were not set at the same time\&. +.RE +.SH "EXAMPLES" +.PP +A single invocation of `pam_setquota` applies a specific policy to a UID range\&. Applying different policies to specific UID ranges is done by invoking pam_setquota more than once\&. The last matching entry defines the resulting quota\&. +.sp +.if n \{\ +.RS 4 +.\} +.nf + session required pam_setquota\&.so bsoftlimit=1000 bhardlimit=2000 isoftlimit=1000 ihardlimit=2000 startuid=1000 enduid=0 fs=/home + session required pam_setquota\&.so bsoftlimit=19000 bhardlimit=20000 isoftlimit=3000 ihardlimit=4000 startuid=2001 enduid=3000 fs=/dev/sda1 + session required pam_setquota\&.so bsoftlimit=19000 bhardlimit=20000 isoftlimit=3000 ihardlimit=4000 startuid=3001 enduid=4000 fs=/dev/sda1 overwrite=1 + +.fi +.if n \{\ +.RE +.\} +.sp +.SH "SEE ALSO" +.PP +\fBpam.conf\fR(5), +\fBpam.d\fR(5), +\fBpam\fR(8) +.SH "AUTHOR" +.PP +pam_setquota was originally written by Ruslan Savchenko <savrus@mexmat\&.net>\&. +.PP +Further modifications were made by Shane Tzen <shane@ict\&.usc\&.edu>, Sven Hartge <sven@svenhartge\&.de> and Keller Fuchs <kellerfuchs@hashbang\&.sh>\&. diff --git a/modules/pam_setquota/pam_setquota.8.xml b/modules/pam_setquota/pam_setquota.8.xml new file mode 100644 index 0000000..fe83c80 --- /dev/null +++ b/modules/pam_setquota/pam_setquota.8.xml @@ -0,0 +1,301 @@ +<?xml version="1.0" encoding='UTF-8'?> +<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"> + +<refentry id="pam_setquota"> + + <refmeta> + <refentrytitle>pam_setquota</refentrytitle> + <manvolnum>8</manvolnum> + <refmiscinfo class="sectdesc">Linux-PAM Manual</refmiscinfo> + </refmeta> + + <refnamediv id="pam_setquota-name"> + <refname>pam_setquota</refname> + <refpurpose>PAM module to set or modify disk quotas on session start</refpurpose> + </refnamediv> + + <refsynopsisdiv> + <cmdsynopsis id="pam_setquota-cmdsynopsis"> + <command>pam_setquota.so</command> + <arg choice="opt"> + fs=<replaceable>/home</replaceable> + </arg> + <arg choice="opt"> + overwrite=<replaceable>0</replaceable> + </arg> + <arg choice="opt"> + debug=<replaceable>0</replaceable> + </arg> + <arg choice="opt"> + startuid=<replaceable>1000</replaceable> + </arg> + <arg choice="opt"> + enduid=<replaceable>0</replaceable> + </arg> + <arg choice="opt"> + bsoftlimit=<replaceable>19000</replaceable> + </arg> + <arg choice="opt"> + bhardlimit=<replaceable>20000</replaceable> + </arg> + <arg choice="opt"> + isoftlimit=<replaceable>3000</replaceable> + </arg> + <arg choice="opt"> + ihardlimit=<replaceable>4000</replaceable> + </arg> + </cmdsynopsis> + </refsynopsisdiv> + + <refsect1 id="pam_setquota-description"> + + <title>DESCRIPTION</title> + + <para> + pam_setquota is a PAM module to set or modify a disk quota at session start + </para> + <para> + This makes quotas usable with central user databases, such as MySQL or LDAP. + </para> + + </refsect1> + + <refsect1 id="pam_setquota-options"> + + <title>OPTIONS</title> + <para> + <variablelist> + <varlistentry> + <term> + <option>fs=<replaceable>/home</replaceable></option> + </term> + <listitem> + <para> + The device file or mountpoint the policy applies to. Defaults to the + filesystem containing the users home directory. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + <option>overwrite=<replaceable>0</replaceable></option> + </term> + <listitem> + <para> + Overwrite an existing quota. Note: Enabling this will remove the ability + for the admin to manually configure different quotas for users for a + filesystem with <citerefentry><refentrytitle>edquota</refentrytitle> + <manvolnum>8</manvolnum></citerefentry>. (Defaults to 0) + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + <option>debug=<replaceable>0</replaceable></option> + </term> + <listitem> + <para> + Enable debugging. A value of 1 outputs the old and new quota on a device. + A value of 2 also prints out the matched and found filesystems should + <option>fs</option> be unset. (Defaults to 0) + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + <option>startuid=<replaceable>1000</replaceable></option> + </term> + <listitem> + <para> + Describe the start of the UID range the policy is applied to. + (Defaults to UID_MIN from login.defs or the uidmin value defined + at compile-time if UID_MIN is undefined.) + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + <option>enduid=<replaceable>0</replaceable></option> + </term> + <listitem> + <para> + Describe the end of the UID range the policy is applied to. Setting + <emphasis>enduid=0</emphasis> results in an open-ended UID + range (i.e. all uids greater than <option>startuid</option> are + included). (Defaults to 0) + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + <option>bsoftlimit=<replaceable>19000</replaceable></option> + </term> + <listitem> + <para> + Soft limit for disk quota blocks, as defined by <citerefentry> + <refentrytitle>quotactl</refentrytitle><manvolnum>2</manvolnum> + </citerefentry>. + Note: <option>bsoftlimit</option> and <option>bhardlimit</option> + <emphasis>must</emphasis> be set at the same time! + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + <option>bhardlimit=<replaceable>20000</replaceable></option> + </term> + <listitem> + <para> + Hard limit for disk quota blocks, as defined by <citerefentry> + <refentrytitle>quotactl</refentrytitle><manvolnum>2</manvolnum> + </citerefentry>. + Note: <option>bsoftlimit</option> and <option>bhardlimit</option> + <emphasis>must</emphasis> be set at the same time! + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + <option>isoftlimit=<replaceable>3000</replaceable></option> + </term> + <listitem> + <para> + Soft limit for inodes, as defined by <citerefentry><refentrytitle> + quotactl</refentrytitle><manvolnum>2</manvolnum></citerefentry>. + Note: <option>isoftlimit</option> and <option>ihardlimit</option> + <emphasis>must</emphasis> be set at the same time! + </para> + </listitem> + </varlistentry> + <varlistentry> + <term> + <option>ihardlimit=<replaceable>4000</replaceable></option> + </term> + <listitem> + <para> + Hard limit for inodes, as defined by <citerefentry><refentrytitle> + quotactl</refentrytitle><manvolnum>2</manvolnum></citerefentry>. + Note: <option>isoftlimit</option> and <option>ihardlimit</option> + <emphasis>must</emphasis> be set at the same time! + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 id="pam_setquota-types"> + <title>MODULE TYPES PROVIDED</title> + <para> + Only the <option>session</option> module type is provided. + </para> + </refsect1> + + <refsect1 id='pam_setquota-return_values'> + <title>RETURN VALUES</title> + <para> + <variablelist> + + <varlistentry> + <term>PAM_SUCCESS</term> + <listitem> + <para> + The quota was set successfully. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term>PAM_IGNORE</term> + <listitem> + <para> + No action was taken because either the UID of the user was outside + of the specified range, a quota already existed and + <option>overwrite=1</option> was not configured or no limits were + configured at all. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term>PAM_USER_UNKNOWN</term> + <listitem> + <para> + The user was not found. + </para> + </listitem> + </varlistentry> + + <varlistentry> + <term>PAM_PERM_DENIED</term> + <listitem> + <para> + <filename>/proc/mounts</filename> could not be opened. + </para> + <para> + The filesystem or device specified was not found. + </para> + <para> + The limits for the user could not be retrieved. See syslog for + more information. + </para> + <para> + The limits for the user could not be set. See syslog for + more information. + </para> + <para> + Either <option>isoftlimit</option>/<option>ihardlimit</option> + or <option>bsoftlimit</option>/<option>bhardlimit</option> were + not set at the same time. + </para> + </listitem> + </varlistentry> + + </variablelist> + </para> + </refsect1> + + <refsect1 id='pam_setquota-examples'> + <title>EXAMPLES</title> + <para> + A single invocation of `pam_setquota` applies a specific policy to a UID + range. Applying different policies to specific UID ranges is done by + invoking pam_setquota more than once. The last matching entry + defines the resulting quota. + <programlisting> + session required pam_setquota.so bsoftlimit=1000 bhardlimit=2000 isoftlimit=1000 ihardlimit=2000 startuid=1000 enduid=0 fs=/home + session required pam_setquota.so bsoftlimit=19000 bhardlimit=20000 isoftlimit=3000 ihardlimit=4000 startuid=2001 enduid=3000 fs=/dev/sda1 + session required pam_setquota.so bsoftlimit=19000 bhardlimit=20000 isoftlimit=3000 ihardlimit=4000 startuid=3001 enduid=4000 fs=/dev/sda1 overwrite=1 + </programlisting> + </para> + </refsect1> + + <refsect1 id='pam_setquota-see_also'> + <title>SEE ALSO</title> + <para> + <citerefentry> + <refentrytitle>pam.conf</refentrytitle><manvolnum>5</manvolnum> + </citerefentry>, + <citerefentry> + <refentrytitle>pam.d</refentrytitle><manvolnum>5</manvolnum> + </citerefentry>, + <citerefentry> + <refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum> + </citerefentry> + </para> + </refsect1> + + <refsect1 id='pam_setquota-author'> + <title>AUTHOR</title> + <para> + pam_setquota was originally written by + Ruslan Savchenko <savrus@mexmat.net>. + </para> + <para> + Further modifications were made by Shane Tzen <shane@ict.usc.edu>, + Sven Hartge <sven@svenhartge.de> + and Keller Fuchs <kellerfuchs@hashbang.sh>. + </para> + </refsect1> + +</refentry> |