KCALDAV.PASSWD(1) General Commands Manual KCALDAV.PASSWD(1)

change kcaldav user information

kcaldav.passwd [
] [
-d directory
] [
-e email
] [
-f caldir
] [
-u user
] [

The kcaldav.passwd program updates the database for an instance of kcaldav(8). By default, it changes /caldav/kcaldav.db for the user with the currently logged-in username, prompting for the existing passwords when it does so. Its arguments are as follows:
Create a new user with a default email (see -e) and calendar (see -d). The current real user (via getuid(2)) must match the password database owner to use this option, or the real user must be root. Does nothing if a user by that name already exists. If the database does not exist, creates it with the current real user set as the database owner.
Do not change the user password, but only the user attributes (e.g., -e email).
Add a calendar directory for the requested user, or set the default directory if specified with -C. If not specified when -C, is specified the directory “calendar” is used. If not using -C and the collection already exists, it is a no-op.
Change the e-mail address of the requested user. This can be any email address. If unspecified and the new user is created with -C, this defaults to <user>@<hostname>, where the hostname is looked up with gethostname(3) and defaults to localhost if there's no hostname set.
Specify an alternative database directory.
Use an alternative username. The current real user (via getuid(2)) must match the password file owner to use this option, or the real user must be root.
A list of iCalendar resources to add to the calendar collection -d or “calendar” if none was specified. The name of the calendar is the filename component of resource.
kcaldav.passwd is designed for use by a single user or by a set of users on a UNIX server. To achieve the latter, one may use the set-user-ID or set-group-ID bits on the kcaldav.passwd binary, disallowing users direct access to the file except by way of kcaldav.passwd. See the EXAMPLES section for possibilities.
Always remember to set the database to be read-writable by the web server!

The kcaldav.passwd utility exits 0 on success, and >0 if an error occurs.

To have a calendar database usable by system users, but restricted to the kcaldav.passwd binary, you might use a dummy “kcaldav” user owning the file.
# chown kcaldav /usr/local/bin/kcaldav.passwd 
# chmod u+s /usr/local/bin/kcaldav.passwd 
# sudo -u kcaldav kcaldav.passwd -C -u <user>
System users may then run kcaldav.passwd as themselves.
To add calendars to a principal, try
% kcaldav.passwd -n -d newcalendar
To add resources to a new calendar or existing, try
% kcaldav.passwd -n -d newcalendar file1.ics file2.ics

April 19, 2016 OpenBSD 6.4