]> granicus.if.org Git - linux-pam/blob - modules/pam_umask/pam_umask.8.xml
09fc0e7c5b610c062c465272f11e0aaf50f8d755
[linux-pam] / modules / pam_umask / pam_umask.8.xml
1 <?xml version="1.0" encoding='UTF-8'?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN"
3         "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
4
5 <refentry id="pam_umask">
6
7   <refmeta>
8     <refentrytitle>pam_umask</refentrytitle>
9     <manvolnum>8</manvolnum>
10     <refmiscinfo class="sectdesc">Linux-PAM Manual</refmiscinfo>
11   </refmeta>
12
13   <refnamediv id="pam_umask-name">
14     <refname>pam_umask</refname>
15     <refpurpose>PAM module to set the file mode creation mask</refpurpose>
16   </refnamediv>
17
18   <refsynopsisdiv>
19     <cmdsynopsis id="pam_umask-cmdsynopsis">
20       <command>pam_umask.so</command>
21       <arg choice="opt">
22         debug
23       </arg>
24       <arg choice="opt">
25         silent
26       </arg>
27       <arg choice="opt">
28         usergroups
29       </arg>
30       <arg choice="opt">
31         umask=<replaceable>mask</replaceable>
32       </arg>
33     </cmdsynopsis>
34   </refsynopsisdiv>
35
36   <refsect1 id="pam_umask-description">
37
38     <title>DESCRIPTION</title>
39
40     <para>
41       pam_umask is a PAM module to set the file mode creation mask
42       of the current environment. The umask affects the default
43       permissions assigned to newly created files.
44     </para>
45     <para>
46       The PAM module tries to get the umask value from the
47       following places in the following order:
48       <itemizedlist>
49         <listitem>
50           <para>
51             umask= argument
52           </para>
53         </listitem>
54         <listitem>
55           <para>
56             umask= entry of the users GECOS field
57           </para>
58         </listitem>
59         <listitem>
60           <para>
61             pri= entry of the users GECOS field
62           </para>
63         </listitem>
64         <listitem>
65           <para>
66             ulimit= entry of the users GECOS field
67           </para>
68         </listitem>
69         <listitem>
70           <para>
71             UMASK= entry from /etc/default/login
72           </para>
73         </listitem>
74         <listitem>
75           <para>
76             UMASK entry from /etc/login.defs
77           </para>
78         </listitem>
79       </itemizedlist>
80     </para>
81
82   </refsect1>
83
84   <refsect1 id="pam_umask-options">
85
86     <title>OPTIONS</title>
87     <para>
88       <variablelist>
89
90         <varlistentry>
91           <term>
92             <option>debug</option>
93           </term>
94           <listitem>
95             <para>
96               Print debug information.
97             </para>
98           </listitem>
99         </varlistentry>
100
101         <varlistentry>
102           <term>
103             <option>silent</option>
104           </term>
105           <listitem>
106             <para>
107               Don't print informative messages.
108             </para>
109           </listitem>
110         </varlistentry>
111
112         <varlistentry>
113           <term>
114             <option>usergroups</option>
115           </term>
116           <listitem>
117             <para>
118               If the user is not root, and the user ID is equal to the
119               group ID, and the username is the same as primary group name,
120               the umask group bits are set to be the same as
121               owner bits (examples: 022 -> 002, 077 -> 007).
122             </para>
123           </listitem>
124         </varlistentry>
125
126         <varlistentry>
127           <term>
128             <option>umask=<replaceable>mask</replaceable></option>
129           </term>
130           <listitem>
131             <para>
132                Sets the calling process's file mode creation mask (umask)
133                to <option>mask</option> &amp; 0777. The value is interpreted
134                as Octal.
135             </para>
136           </listitem>
137         </varlistentry>
138
139       </variablelist>
140
141     </para>
142   </refsect1>
143
144   <refsect1 id="pam_umask-types">
145     <title>MODULE TYPES PROVIDED</title>
146     <para>
147       Only the <option>session</option> type is provided.
148     </para>
149   </refsect1>
150
151   <refsect1 id='pam_umask-return_values'>
152     <title>RETURN VALUES</title>
153     <para>
154       <variablelist>
155
156         <varlistentry>
157           <term>PAM_SUCCESS</term>
158           <listitem>
159             <para>
160               The new umask was set successfully.
161             </para>
162           </listitem>
163         </varlistentry>
164
165         <varlistentry>
166           <term>PAM_SERVICE_ERR</term>
167           <listitem>
168             <para>
169               No username was given.
170             </para>
171           </listitem>
172         </varlistentry>
173
174         <varlistentry>
175           <term>PAM_USER_UNKNOWN</term>
176           <listitem>
177             <para>
178               User not known.
179             </para>
180           </listitem>
181         </varlistentry>
182
183       </variablelist>
184     </para>
185   </refsect1>
186
187   <refsect1 id='pam_umask-examples'>
188     <title>EXAMPLES</title>
189     <para>
190       Add the following line to <filename>/etc/pam.d/login</filename> to
191       set the user specific umask at login:
192       <programlisting>
193         session optional pam_umask.so umask=0022
194       </programlisting>
195     </para>
196   </refsect1>
197
198   <refsect1 id='pam_umask-see_also'>
199     <title>SEE ALSO</title>
200     <para>
201       <citerefentry>
202         <refentrytitle>pam.conf</refentrytitle><manvolnum>5</manvolnum>
203       </citerefentry>,
204       <citerefentry>
205         <refentrytitle>pam.d</refentrytitle><manvolnum>5</manvolnum>
206       </citerefentry>,
207       <citerefentry>
208         <refentrytitle>pam</refentrytitle><manvolnum>8</manvolnum>
209       </citerefentry>
210     </para>
211   </refsect1>
212
213   <refsect1 id='pam_umask-author'>
214     <title>AUTHOR</title>
215       <para>
216         pam_umask was written by Thorsten Kukuk &lt;kukuk@thkukuk.de&gt;.
217       </para>
218   </refsect1>
219
220 </refentry>