summaryrefslogtreecommitdiff
path: root/modules/pam_umask/pam_umask.8
blob: 7098f107cc67c506c1180ced8e06703054ea7aa1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
.\"     Title: pam_umask
.\"    Author: 
.\" Generator: DocBook XSL Stylesheets v1.73.1 <http://docbook.sf.net/>
.\"      Date: 04/16/2008
.\"    Manual: Linux-PAM Manual
.\"    Source: Linux-PAM Manual
.\"
.TH "PAM_UMASK" "8" "04/16/2008" "Linux-PAM Manual" "Linux\-PAM Manual"
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
pam_umask - PAM module to set the file mode creation mask
.SH "SYNOPSIS"
.HP 13
\fBpam_umask\.so\fR [debug] [silent] [usergroups] [umask=\fImask\fR]
.SH "DESCRIPTION"
.PP
pam_umask is a PAM module to set the file mode creation mask of the current environment\. The umask affects the default permissions assigned to newly created files\.
.PP
The PAM module tries to get the umask value from the following places in the following order:
.sp
.RS 4
\h'-04'\(bu\h'+03'umask= argument
.RE
.sp
.RS 4
\h'-04'\(bu\h'+03'umask= entry of the users GECOS field
.RE
.sp
.RS 4
\h'-04'\(bu\h'+03'pri= entry of the users GECOS field
.RE
.sp
.RS 4
\h'-04'\(bu\h'+03'ulimit= entry of the users GECOS field
.RE
.sp
.RS 4
\h'-04'\(bu\h'+03'UMASK= entry from /etc/default/login
.RE
.sp
.RS 4
\h'-04'\(bu\h'+03'UMASK entry from /etc/login\.defs
.RE
.sp
.RE
.SH "OPTIONS"
.PP
.PP
\fBdebug\fR
.RS 4
Print debug information\.
.RE
.PP
\fBsilent\fR
.RS 4
Don\'t print informative messages\.
.RE
.PP
\fBusergroups\fR
.RS 4
If the user is not root, and the user ID is equal to the group ID, and the username is the same as primary group name, the umask group bits are set to be the same as owner bits (examples: 022 \-> 002, 077 \-> 007)\.
.RE
.PP
\fBumask=\fR\fB\fImask\fR\fR
.RS 4
Sets the calling process\'s file mode creation mask (umask) to
\fBmask\fR
& 0777\. The value is interpreted as Octal\.
.RE
.SH "MODULE SERVICES PROVIDED"
.PP
Only the
\fBsession\fR
service is supported\.
.SH "RETURN VALUES"
.PP
.PP
PAM_SUCCESS
.RS 4
The new umask was set successfull\.
.RE
.PP
PAM_SERVICE_ERR
.RS 4
No username was given\.
.RE
.PP
PAM_USER_UNKNOWN
.RS 4
User not known\.
.RE
.SH "EXAMPLES"
.PP
Add the following line to
\fI/etc/pam\.d/login\fR
to set the user specific umask at login:
.sp
.RS 4
.nf
        session optional pam_umask\.so umask=0022
      
.fi
.RE
.sp
.SH "SEE ALSO"
.PP

\fBpam.conf\fR(5),
\fBpam.d\fR(8),
\fBpam\fR(8)
.SH "AUTHOR"
.PP
pam_umask was written by Thorsten Kukuk <kukuk@thkukuk\.de>\.