GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  AUTH_MKHOMEDIR (3)

--> --> .ds Aq ’

NAME

auth_mkhomedir - Autocreate a new accounts home directory

CONTENTS

SYNOPSIS

#include <courierauth.h>

int rc=auth_mkhomedir(struct authinfo *auth);

DESCRIPTION

A callback_func thats passed as a parameter to \m[blue]auth_getuserinfo(3)\m[][1] can invoke this function to automatically create a new accounts home directory, if the authlib client is running as root, forwarding the authinfo pointer from the callback.

auth_mkhomedir() checks if the AUTH_MKHOMEDIR_SKEL environment variable is set, and if the authenticated accounts home directory does not exist. If the environment variable is set it must point to a directory like /etc/skel that contains a template for the contents of a new accounts home directory.

If AUTH_MKHOMEDIR_SKEL is not set, or if the home directory exists, auth_mkhomedir() does nothing and returns 0. Otherwise the accounts home directory gets created, and the contents of the AUTH_MKHOMEDIR_SKEL directory get recursively copied into the new home directory. The permissions of AUTH_MKHOMEDIR_SKEL and its contents are preserved, and the owner userid and groupid is set to the authenticated accounts userid and groupid.

RETURNS

auth_mkhomedir() returns a non-zero value if an error occured while creating the new accounts home directory. auth_mkhomedir() returns zero if the new accounts home directory was created successfully, or if the accounts home directory already exists.

SEE ALSO

\m[blue]authlib(3)\m[][2], \m[blue]auth_getuserinfo(3)\m[][1].

NOTES

1. auth_getuserinfo(3)  http://www.courier-mta.org/authlib/auth_getuserinfo.html
2. authlib(3)  http://www.courier-mta.org/authlib/authlib.html
Search for    or go to Top of page |  Section 3 |  Main Index


Double Precision, Inc. AUTH_MKHOMEDIR (3) 06/20/2015

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.