auth_mkhomedir man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

AUTH_MKHOMEDIR(3)	    Double Precision, Inc.	     AUTH_MKHOMEDIR(3)

NAME
       auth_mkhomedir - Autocreate a new account's home directory

SYNOPSIS
       #include <courierauth.h>

       int rc=auth_mkhomedir(struct authinfo *auth);

DESCRIPTION
       A callback_func that's passed as a parameter to auth_getuserinfo(3)[1]
       can invoke this function to automatically create a new account's 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 account's 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
       account's home directory.

       If AUTH_MKHOMEDIR_SKEL is not set, or if the home directory exists,
       auth_mkhomedir() does nothing and returns 0. Otherwise the account's
       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
       account's userid and groupid.

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

SEE ALSO
       authlib(3)[2], auth_getuserinfo(3)[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

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

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net