-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathkcaldav.passwd.in.1
154 lines (154 loc) · 4.01 KB
/
kcaldav.passwd.in.1
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
.\" Copyright (c) Kristaps Dzonsons <kristaps@bsd.lv>
.\"
.\" Permission to use, copy, modify, and distribute this software for any
.\" purpose with or without fee is hereby granted, provided that the above
.\" copyright notice and this permission notice appear in all copies.
.\"
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate$
.Dt KCALDAV.PASSWD 1
.Os
.Sh NAME
.Nm kcaldav.passwd
.Nd change kcaldav principal information
.Sh SYNOPSIS
.Nm kcaldav.passwd
.Op Fl Cnv
.Op Fl d Ar collection
.Op Fl e Ar email
.Op Fl f Ar caldir
.Op Fl u Ar principal
.Op Ar resource...
.Sh DESCRIPTION
Updates database entries for
.Xr kcaldav 8
principals.
Its arguments are as follows:
.Bl -tag -width Ds
.It Fl C
Create a new principal with an initial collection
.Qq calendar .
The e-mail address is the principal's name at the current host (see
.Xr hostname 1 )
or
.Qq localhost
if there's no system-wide hostname set.
.It Fl n
Do not change the principal's password: only change attributes (such as
with
.Fl e ) .
Ignored if used with
.Fl C .
.It Fl d Ar collection
Add a collection for the principal, doing nothing if the collection
already exists.
If used with
.Fl C ,
sets the initial collection.
.It Fl e Ar email
Set the principal's e-mail address.
.It Fl f Ar caldir
The database directory.
.It Fl u Ar principal
The principal to look up in the database.
.It Fl v
Verbose.
Shows underlying database operations.
.It Ar resource...
A list of resources to add to the collection of
.Fl d
or
.Qq calendar
by default.
The name of each resource is set from its filename component.
.El
.Pp
By default, the password is changed for the principal matching the
logged-in user (see
.Xr logname 1 ) .
The database
.Pa kcaldav.db
is looked for in
.Pa @CALPREFIX@ .
.Pp
If the database is created with
.Fl C ,
its owner is set to the current real user.
If the database exists and
.Fl C
or
.Fl u
is used, the current real user (via
.Xr getuid 2 )
must match the database owner or be root.
.Pp
The database must be read-writable by the web server.
.\" .Sh IMPLEMENTATION NOTES
.\" Not used in OpenBSD.
.\" .Sh RETURN VALUES
.\" For sections 2, 3, and 9 function return values only.
.\" .Sh ENVIRONMENT
.\" For sections 1, 6, 7, and 8 only.
.\" .Sh FILES
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
In the simplest case, root creates and maintains the database.
Assuming the database is in
.Pa @CALPREFIX@ :
.Bd -literal -offset indent
# kcaldav.passwd -Cu kristaps
New password: *********
Repeat new password: *********
.Ed
.Pp
After this time, the user
.Qq kristaps
can access their default calendar
.Qq calendar .
.Pp
To have the database modifiable by local users, use a dummy
.Qq kcaldav
user owning the file and creating new users.
Thi assumes that the database doesn't already exist.
.Bd -literal -offset indent
# chown _kcaldav @PREFIX@/bin/kcaldav.passwd
# chmod u+s @PREFIX@/bin/kcaldav.passwd
# doas -u _kcaldav kcaldav.passwd -Cu kristaps
New password: *********
Repeat new password: *********
.Ed
.Pp
The user may then set their password:
.Pp
.Dl % kcaldav.passwd -ne kristaps@bsd.lv
.Pp
Or add calendars:
.Bd -literal -offset indent
% kcaldav.passwd -nd newcalendar
% kcaldav.passwd -nd secondcalendar
.Ed
.Pp
To add resources to a new or existing calendar:
.Pp
.Dl % kcaldav.passwd -nd newcalendar file1.ics file2.ics
.\" .Sh DIAGNOSTICS
.\" For sections 1, 4, 6, 7, 8, and 9 printf/stderr messages only.
.\" .Sh ERRORS
.\" For sections 2, 3, 4, and 9 errno settings only.
.Sh SEE ALSO
.Xr kcaldav 8
.\" .Sh STANDARDS
.\" .Sh HISTORY
.\" .Sh AUTHORS
.\" .Sh CAVEATS
.\" .Sh BUGS
.\" .Sh SECURITY CONSIDERATIONS
.\" Not used in OpenBSD.