Autodir HOWTO
Venkata RamanaEnaganti
Email: ramana <> intraperson dot com Publication date: 2004-09-23
Revision History:
1.04 |
2007-5-25 |
VRE |
Minor updates |
1.042007-5-25VREMinor updates |
|||
1.03 |
2006-09-15 |
GaMA |
Review requested by author. |
1.032006-09-15GaMAReview requested by author. |
|||
1.02 |
2004-12-25 |
VRE |
Minor updates |
1.02 |
2004-12-25 |
VRE |
Minor updates |
1.00 |
2004-09-23 |
VRE |
Initial release, reviewed by Rahul Sundaram at TLDP |
1.00 |
2004-09-23 |
VRE |
Initial release, reviewed by Rahul Sundaram at TLDP |
0.32 |
2004-09-13 |
VRE |
New sections like requirements and others. |
0.32 |
2004-09-13 |
VRE |
New sections like requirements and others. |
0.10 |
2004-06-24 |
VRE |
second draft |
0.10 |
2004-06-24 |
VRE |
second draft |
0.9 |
2004-06-11 |
VRE |
first draft |
0.92 |
004-06-11 |
VRE |
first draft |
This HOWTO is about the Autodir installation, configuration and other issues related to Autodir. The Autodir system is often applied for making home directories available in an easy way.This HOWTO is about the installation, configuration and other issues related to The system is often applied for making home directories available in an easy way.
Introduction
Autodir offers a simple and effective means to create directories like home directories in a transparent manner. It relies on the autofs protocol for its operation. offers a simple and effective means to create directories like home directories in a transparent manner. It relies on the
[htp://www.autofs.org autofs] autofs protocol for its operation.This document explains how to create directories on demand using Autodir in a transparent way to the applications. This document also explains using the transparent backup feature that is possible with Autodir, without system downtime for backup purpose; this applies for all directories managed by Autodir.This document explains how to create directories on demand using in a transparent way to the applications. This document also explains using the transparent backup feature that is possible with , without system downtime for backup purpose; this applies for all directories managed by
Copyright and License
This document, Autodir HOWTO, is copyrighted (c) 2004 by Venkata Ramana Enaganti.This work is licensed under the Creative Commons Attribution License. To view a copy of this license, visit http://creativecommons.org/licenses/by/2.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA. This document, , is copyrighted (c) 2004 by
This work is licensed under the Creative Commons Attribution License. To view a copy of this license, visit
[http://creativecommons.org/licenses/by/2.0 http://creativecommons.org/licenses/by/2.0/] http://creativecommons.org/licenses/by/2.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA. Linux is a registered trademark of Linus Torvalds.
Linux is a registered trademark of Linus Torvalds.
Disclaimer
No liability for the contents of this document can be accepted. Use the concepts, examples and information at your own risk. There may be errors and inaccuracies, that could be damaging to your system. Proceed with caution, and although this is highly unlikely, the author(s) do not take any responsibility. No liability for the contents of this document can be accepted. Use the concepts, examples and information at your own risk. There may be errors and inaccuracies, that could be damaging to your system. Proceed with caution, and although this is highly unlikely, the author(s) do not take any responsibility. All copyrights are held by their by their respective owners, unless specifically noted otherwise. Use of a term in this document should not be regarded as affecting the validity of any trademark or service mark. Naming of particular products or brands should not be seen as endorsements. All copyrights are held by their by their respective owners, unless specifically noted otherwise. Use of a term in this document should not be regarded as affecting the validity of any trademark or service mark. Naming of particular products or brands should not be seen as endorsements.
Feedback
Feedback is most certainly welcome for this document. Send your additions, comments and criticisms to the following email address : ramana <> intraperson dot com. Feedback is most certainly welcome for this document. Send your additions, comments and criticisms to the following email address : Email: ramana <> intraperson dot com.
New Versions of this Document
The latest version of this HOWTO will be made available from http://www.intraperson.com/autodir/.The latest version of this HOWTO will be made available from
[http://www.intraperson.com/autodir/ http://www.intraperson.com/autodir/] http://www.intraperson.com/autodir/.
Credits / Contributors
In this document, I have the pleasure of acknowledging for language and technical review work: In this document, I have the pleasure of acknowledging for language and technical review work:
Rahul Sundaramrahulsundaram@yahoo.co.in Rahul Sundaram Email: rahulsundaram@yahoo.co.in Machtelt Garrels
Before going into the details...
After releasing intraperson beta, I started working on a administration guide that deals with the administration aspects of intraPerson. For more details check But I was stuck with one simple thing. It is easy to create users in LDAP - at least I think so - but how to create home directories for those users in LDAP wherever those LDAP accounts are imported?After releasing intraperson beta, I started working on a administration guide that deals with the administration aspects of For more details check
But I was stuck with one simple thing. It is easy to create users in LDAP - at least I think so - but how to create home directories for those users in LDAP wherever those LDAP accounts are imported?I found some solutions, but I was not satisfied as every solution has serious drawbacks. After leafing through the Autofs documents and hacking a bit, I came to the conclusion that the Autofs protocol might offer a much better solution to this challenge.I found some solutions, but I was not satisfied as every solution has serious drawbacks. After leafing through the Autofs documents and hacking a bit, I came to the conclusion that the Autofs protocol might offer a much better solution to this challenge.The result is Autodir, based on the Autofs protocol.The result is , based on the Autofs protocol.
Why not pam_mkhomedir?
The PAM module pam_mkhomedir uses Pluggable Authentication Module architecture for its operation. As such, there are some limitations associated with it. For instance:The PAM module uses Pluggable Authentication Module architecture for its operation. As such, there are some limitations associated with it. For instance:Some servers may not authenticate users but they may expect user directories to exist. This means they do not use PAM, and in turn, pam_mkhomedir does not get a chance to create home directories. The notorious example is on email servers.Some servers may not authenticate users but they may expect user directories to exist. This means they do not use PAM, and in turn, does not get a chance to create home directories. The notorious example is on email servers.PAM is always an optional component for authentication. Some services may not use PAM at all and use a different method to authenticate users. In this case pam_mkhomedir is never going to be used.PAM is always an optional component for authentication. Some services may not use PAM at all and use a different method to authenticate users. In this case is never going to be used.Generally /home is owned by root and only root users can create home directories in it. Therefore the service that wishes to create home directories through PAM must be run as root, or else the home directory must have the same permissions as, for instance, /tmp.Generally /home is owned by root and only root users can create home directories in it. Therefore the service that wishes to create home directories through PAM must be run as root, or else the home directory must have the same permissions as, for instance, /tmp
Finally, Autodir is much wider in scope and supports many more interesting features.Finally, is much wider in scope and supports many more interesting features.
Where can Autodir be used?
Where user accounts reside in centralized database like LDAP, SQL, NIS, NIS+ or other databases, from which user and groups are imported to other systems. To create, for example home, group directories in those systems which import these accounts from centralized database, on demand.Where user accounts reside in centralized database like LDAP, SQL, NIS, NIS+ or other databases, from which user and groups are imported to other systems. To create, for example home, group directories in those systems which import these accounts from centralized database, on demand.To exploit its transparent backup feature for 24*7 online systems.To exploit its transparent backup feature for 24*7 online systems.It can even be used when accounts are in a local system, to some extent hiding what accounts exist in the /home directory, for example.It can even be used when accounts are in a local system, to some extent hiding what accounts exist in the /home directory, for example.
What Autodir is not
Autodir can create directories but it does not remove them once user and/or group entries are removed from the system accounts database. Use custom made scripts from cron for this. can create directories but it does not remove them once user and/or group entries are removed from the system accounts database. Use custom made scripts from cron for this.
Differences between Autodir and Autofs
Issue arises when you are already using the Autofs package, handling the mounts of (home) directories. Let's look at the differences between the two packages:Issue arises when you are already using the Autofs package, handling the mounts of (home) directories. Let's look at the differences between the two packages:The main purpose of autofs is to deal with network mounts on demand instead of mounting all at the same time, which results in preserving system resources. Though there is some support in the autofs package to mount home directories on demand, the requirement is that these home directories must exist already.The main purpose of autofs is to deal with network mounts on demand instead of mounting all at the same time, which results in preserving system resources. Though there is some support in the autofs package to mount home directories on demand, the requirement is thatOn the other hand, Autodir specializes only in local directory creation and mounting them on demand.On the other hand, specializes in local directory creation and mounting them on demand.Autodir can also create real directories in disk file systems, which do not reside in one single flat base directory. This is how utilities like useradd create by default. In a standard file system setup, all home directories reside in the base /home directory. For file systems like ext2 and ext3 performance will degrade if a large number of home directories exist in one single base directory. can also create real directories in disk file systems, which do not reside in one single flat base directory. This is how utilities like create by default. In a standard file system setup, all home directories reside in the base /home directory. For file systems like ext2 and ext3 performance will degrade if a large number of home directories exist in one single base directory. For applications accessing these directories, Autodir presents all directories for them in a single autofs mounted virtual base directory on demand; actual directories are created in subdirectories of some other directory in hierarchical style. For applications accessing these directories, presents all directories for them in a autofs mounted virtual base directory ; actual directories are created in subdirectories of some other directory in hierarchical style. For example, the real home for a user with username user1 will be created as /autohome/u/us/user1 if configured that way, but mounted in /home on demand for applications accessing the home directory in /home/user1. For example, the real home for a user with username will be created as
/autohome/u/us/user1
- if configured that way, but mounted in
/home
/home/user1
Permissions for the real base directory, where the actual home directories are kept (/autohome in the above example), are kept in such a way that /autohome can not be accessed by anyone except by root.Permissions for the real base directory, where the actual home directories are kept (
/autohome in the above example), are kept in such a way that
/autohome
can not be accessed by anyone except by root.This mounting of directories on demand and unmounting when not in use presents an interesting opportunity: the ability to tell whether a directory is in use or not. If a directory is not in use, a program like a backup application can be safely started when a directory is unmounted.This mounting of directories on demand and unmounting when not in use presents an interesting opportunity: the ability to tell whether a directory is in use or not. If a directory is not in use, a program like a backup application can be safely started when a directory is unmounted.Autodir exploits this capability by starting the command-line mentioned backup whenever a directory becomes unused. exploits this capability by starting the command-line mentioned backup whenever a directory becomes unused.There is one more important issue to be presented if you are an administrator reading this document. Autodir does not call the external programs mount and umount, as is the case with the autofs package; rather, it uses system calls directly. As a side effect, it is faster and more reliable, but the mtab file is not updated. I felt this was not necessary as all mounts and unmounts are local directories.There is one more important issue to be presented if you are an administrator reading this document. does not call the external programs and , as is the case with the autofs package; rather, it uses system calls directly. As a side effect, it is faster and more reliable, but the
mtab
file is not updated. I felt this was not necessary as all mounts and unmounts are local directories.Another minor difference is that Autodir is completely multi-threaded. Autofs is also expected to be multi-threaded in future versions.Another minor difference is that is completely Autofs is also expected to be multi-threaded in future versions.
How it works
Autodir uses modules to get specific functionality. The core Autodir implements generic functionality that modules can exploit and add specific functionality to. uses modules to get specific functionality. The core implements generic functionality that modules can exploit and add specific functionality to.At any moment only one module can be added to Autodir. If there are two modules, for example autohome and autogroup, then two processes of Autodir should be created so that each process can have one of the required modules attached to it.At any moment only one module can be added to If there are two modules, for example and , then two processes of should be created so that each process can have one of the required modules attached to it.For further explanation I chose the autohome module which handles transparent home directory creation.For further explanation I chose the module which handles transparent home directory creation.First the autofs file system is mounted on the /home directory by Autodir. The Linux kernel is informed that /home is managed by a user space application, Autodir, from now on.First the autofs file system is mounted on the
/home
directory by The Linux kernel is informed that
/home
is managed by a user space application, , from now on.
+----------------+ | Linux Kernel | +----------------+ / \ / \ / \ / \ +-------------+ +--------+ +------------+ +-----------------+ | Application |------>| /home |<----->| Autodir |<------>| autohome module | +-------------+ +--------+ +------------+ +-----------------+ \ / \ +----------------+ / +-| /autohome |<------------------+ +----------------+
Whenever an application or daemon needs access to a user's home directory, for example /home/userhome1, they directly enter into /home/userhome1 to access it. The kernel, which notices this, informs Autodir if the userhome1 directory does not yet exist already in /home.Whenever an application or daemon needs access to a user's home directory, for example
/home/userhome1
they directly enter into
/home/userhome1
to access it. The kernel, which notices this, informs if the
userhome1
directory does not yet exist already in
/home
Autodir, in turn, passes this request to the autohome module. The autohome module does not touch the /home directory. Instead it manages real home directories somewhere else, for example in /autohome as shown in the above figure., in turn, passes this request to the module. The module does not touch the
/home
directory. Instead it manages somewhere else, for example in
/autohome
as shown in the above figure.The autohome module creates a real home directory if it does not exist in the /autohome directory. After it is successfully created or failed to be created, whatever the outcome, autohome reports back to Autodir. When the directory creation task has completed successfully, the path to real home directory is provided to Autodir.The module creates a real home directory if it does not exist in the
/autohome
directory. After it is successfully created or failed to be created, whatever the outcome, reports back to When the directory creation task has completed successfully, the path to real home directory is provided toIf the autohome module reports success, Autodir creates userhome1 directory under /home and mounts the real home directory from /autohome on it. At the end of the process, Autodir informs the kernel whether the whole operation was successful or not. Accordingly, the kernel allows applications to enter the directory, or, in case of failure, it reports that no such directory exists.If the module reports success, creates
userhome1
directory under
/home
and mounts the from
/autohome
on it. At the end of the process, informs the kernel whether the whole operation was successful or not. Accordingly, the kernel allows applications to enter the directory, or, in case of failure, it reports that no such directory exists.
Some definitions
Before going further it is better to understand the following terms to simplify explanation.Before going further it is better to understand the following terms to simplify explanation.Each virtual directory is mapped to a real directory. This means that whatever is written to or modified in the virtual directory is actually sent to the real directory.Each is mapped to a This means that whatever is written to or modified in the is actually sent to theOn reboot of the system real directories and their content remain intact. But virtual directories are again created on demand, exactly as they were before.On reboot of the system and their content remain intact. But are again created on demand, exactly as they were before.Virtual directories are removed if these are not used for a specified period of time, and created again if necessary. When a Virtual directory is removed, the backup program is started on the corresponding real directory - if backup is configured. are removed if these are not used for a specified period of time, and created again if necessary. When a is removed, the backup program is started on the corresponding - if backup is configured.
Directory organization in the real base directory
Why should there be any special organization in the real base directory? If we just create all real directories in one real base directory there could be a performance penalty when there are a large number of real directories to be created. File systems like ext2/ext3 are not optimized for this kind of flat directory structure.Why should there be any special organization in the ? If we just create all in one there could be a performance penalty when there are a large number of to be created. File systems like ext2/ext3 are not optimized for this kind of flat directory structure.It would be much better if the real base directory is divided into more subdirectories, or even to divide these subdirectories again into more subdirectories. And in the final subdirectories actual home directories are kept.It would be much better if the is divided into more subdirectories, or even to divide these subdirectories again into more subdirectories. And in the final subdirectories actual home directories are kept.There are three types of directory organization:There are three types of directory organization:
Virtual directory expiration
When an application tries to access a virtual directory in a virtual base directory, Autodir creates the virtual directory in it if it does not exist already and mounts the real directory on it from the real base directory. Once this is done, a timer is started. If the virtual directory is not accessed from the virtual base directory by any application for the specified period of time, this directory is removed and the corresponding real directory in the real base directory is marked for backup.When an application tries to access a in a , creates the in it if it does not exist already and mounts the on it from the Once this is done, a timer is started. If the is not accessed from the by any application for the specified period of time, this directory is removed and the corresponding in the is marked for backup.The time period to wait for expiration can be given through a command line option to Autodir.The time period to wait for expiration can be given through a to
Backup support
Autodir supports backup program launching when a virtual directory is removed after a period of inactivity. Removal of the virtual directory is itself an assurance that no other application can access the content and modify it. supports backup program launching when a is removed after a period of inactivity. Removal of the is itself an assurance that no other application can access the content and modify it.Just like there is wait time for expiring a virtual directory, for backup Autodir also waits during some time after the expiry of the virtual directory, prior to starting the backup. This time period can be configured through a command line option to Autodir.Just like there is wait time for expiring a , for backup also waits during some time after the expiry of the , prior to starting the backup. This time period can be configured through a toBy design, backup programs are expected to operate on real directories but not on virtual directory. If the backup program try to access a virtual directory, then Autodir assumes some regular application is in need of that directory and the backup program is killed, even if the virtual directory accessing process is the backup program itself.By design, backup programs are expected to operate on but not on If the backup program try to access a , then assumes some regular application is in need of that directory and the backup program is killed, even if the accessing process is the backup program itself.A separate backup process for each real directory is used. The backup program can be given arguments of real directories on which to operate.A separate backup process for each is used. The backup program can be given of on which to operate.
Backup program requirements
Autodir demands some extra requirements from the backup program being used: when the backup is working on the real directory, with corresponding expired virtual directory, and that virtual directory is requested again by an application while the backup is running, the backup process is killed. First a SIGTERM is sent to gracefully stop it. But if it does not shut down in time - and it has one second to do this - a SIGKILL will be sent, which is guaranteed to stop the backup. demands some extra requirements from the backup program being used: when the backup is working on the , with corresponding expired , and that is requested again by an application while the backup is running, the backup process is killed. First a is sent to gracefully stop it. But if it does not shut down in time - and it has one second to do this - a will be sent, which is guaranteed to stop the backup.One more important issue is the environment in which the backup runs. All backup programs run as root. But at the same time all unnecessary root privileges are taken away using POSIX capabilities. In other words these backup programs can read any file or directory that belongs to any user on the system and nothing more than that. Other than that, the backup process behaves like an ordinary user level process.One more important issue is the environment in which the backup runs. All backup programs run as root. But at the same time all unnecessary root privileges are taken away using POSIX capabilities. In other words these backup programs can read any file or directory that belongs to any user on the system and nothing more than that. Other than that, the backup process behaves like an ordinary user level process.
Module options
There are two kinds of options that can be passed to Autodir. In the first type, options are for autodir itself and are common irrespective of which module is used. The other type of options are specific to the module being used. These options are called suboptions and are passed to the module being used; they are different from the main -o option. This is similar to the suboptions used with the mount command.There are two kinds of options that can be passed to In the first type, are for itself and are common irrespective of which module is used. The other type of options are specific to the module being used. These options are called suboptions and are passed to the module being used; they are different from the main option. This is similar to the suboptions used with the command.For example, suboptions to the example module autohome can be passed as follows:For example, suboptions to the example module can be passed as follows:
-o 'realpath=/tmp/autohome,level=2,noskel'
Here realpath, level and noskel are suboptions for autohome module.Here , and are suboptions for module.
Autodir requirements
You will need a Linux kernel equal to or later than version 2.4. These kernel versions support mounting one directory on another directory. At this moment Autodir is not ported to other Unices but this may change in the future.You will need a Linux kernel equal to or later than version 2.4. These kernel versions support mounting one directory on another directory. At this moment is not ported to other Unices but this may change in the future.Autodir requires the autofs kernel module based on protocol version 4. But it does not require the autofs user level package. The autofs kernel module is pretty standard and almost all distributions include it. requires the autofs kernel module based on protocol version 4. But it does not require the autofs user level package. The autofs kernel module is pretty standard and almost all distributions include it.
Autofs kernel module
Autodir uses the autofs kernel module for its operation. The kernel module autofs must be loaded before starting autodir. uses the autofs kernel module for its operation. The kernel module must be loaded before startingThis can be done as the root user, using the modprobe command as follows:This can be done as the root user, using the command as follows:
# modprobe autofs
Importing user and group accounts
If user and group accounts reside in a centralized database these must be imported before starting Autodir. How to do this is out of the scope of this HOWTO. There are a number of documents which explain in a clear way how to do this.If user and group accounts reside in a centralized database these must be imported before starting How to do this is out of the scope of this HOWTO. There are a number of documents which explain in a clear way how to do this.
Getting Autodir
At this moment Autodir is available in tar and rpm formats. More information can be found at http://www.intraperson.com/autodir/.At this moment is available in tar and rpm formats. More information can be found at
[http://www.intraperson.com/autodir/ http://www.intraperson.com/autodir/] http://www.intraperson.com/autodir/.After downloading the source, follow these simple steps to install :After downloading the source, follow these simple steps to install :Unpack the source.Unpack the source.$ tar zxvf <tar file name>Move to the expanded directory and execute the following commands:Move to the expanded directory and execute the following commands:$/configure$ make# make install
Managing home directories
This section will explain how to configure Autodir so that user home directories are created on demand. For this purpose the autohome module, which deals with specifics of home directory creation, is used.This section will explain how to configure so that user home directories are created on demand. For this purpose the module, which deals with specifics of home directory creation, is used.To load the autohome module with Autodir, use the -m option. For example, -m /usr/lib/autodir/autohome.so.To load the module with , use the option. For example,
Base directories for autohome
The next step in the setup procedure is to decide where the virtual base directory and real base directory for home directory creation will be located.The next step in the setup procedure is to decide where the and for home directory creation will be located.What are the virtual base directory and the real base directory in the context of the autohome module?What are the and the in the context of the module?This all depends on how user accounts are created. If a user account created for user name user1 with home directory /home/user1 then /homewill become the virtual base directory.This all depends on how user accounts are created. If a user account created for user name user1 with home directory
/home/user1 then
/home
.Then what is the real base directory? This can be any directory. The only thing that you need to keep in mind is that there should be enough space, as all actual files are stored here instead of in the virtual base directory.Then what is the ? This can be any directory. The only thing that you need to keep in mind is that there should be enough space, as all actual files are stored here instead of in theIn most server configurations /home is a separate partition. But if /home is the virtual base directory, then files are not stored in that directory! The solution is not to mount a partition on /home but instead mount it somewhere else and make it the real base directory.In most server configurations
/home is a separate partition. But if
/home
/home
/home
is theIt is somewhat tricky to specify the real base directory. The real base directory is managed by the autohome module so this option must be passed to the module through module suboptions. If the real base directory is /var/autohome then it is specified with the option -o as -o realpath=/var/autohome.It is somewhat tricky to specify the The is managed by the module so this option must be passed to the module through module suboptions. If the is
/var/autohome
then it is specified with the option as
Directory organization
Refer to directory organization under the real base directory for a detailed explanation of this topic.Refer to for a detailed explanation of this topic.autohome does support this kind of organization. The suboption used to specify the desired directory organization the level suboption, for instance: -o level=2. does support this kind of organization. The suboption used to specify the desired directory organization the suboption, for instance:
Misc suboptions for autohome
The suboption skel can be used if the skeleton path is not the default value /etc/skel: -o skel=/some/other/dir.The suboption can be used if the skeleton path is not the default value
/etc/skel
The suboption noskel can be used with -o to indicate not to copy any skeleton files to the home directories when these are created.The suboption can be used with to indicate not to copy any skeleton files to the home directories when these are created.
Example
First, import your user accounts from a centralized database, for instance from LDAP.First, import your user accounts from a centralized database, for instance from LDAP.Next, the autofs kernel module must be loaded into the Linux kernel. This can be done as described in autofs kernel module section.Next, the kernel module must be loaded into the Linux kernel. This can be done as described inIf /home is to be used for home directories then /home will become the virtual directory; this is specified to autodir with the -d /home option.If
/home is to be used for home directories then
/home
/usr/lib/autodir/autohome.so
, this module can be loaded with as Note that the full path for the module is given.The actual location of the real home directories is given with the realpath suboption. If it is /autohome, the location can be specified as realpath=/autohome.The actual location of the real home directories is given with the suboption. If it is /autohome , the location can be specified asWith all these options autodir can be started as:With all these options can be started as:
# autodir -d /home \ -m /usr/lib/autodir/autohome.so \ -o 'realpath=/autohome' \
Once Autodir is started, initially the /home directory will be empty. Whether Autodir is working properly can be tested by changing directories to one of the home directories, as the root user or as the owner of the home directory.Once is started, initially the /home directory will be empty. Whether is working properly can be tested by changing directories to one of the home directories, as the root user or as the owner of the home directory.
Managing group directories
The autogroup module is used for creating group directories on demand for common group access. It can be used with Samba, for example, to dynamically create shared directories for a group of people.The module is used for creating group directories on demand for common group access. It can be used with Samba, for example, to dynamically create shared directories for a group of people.The autogroup configuration is the same as the autohome module, but unlike autohome, the virtual base directory can be placed anywhere and any name can be given to it. It is not dictated by system accounts.The configuration is the same as the module, but unlike , the can be placed anywhere and any name can be given to it. It is not dictated by system accounts.The module autogroup can be used with Autodir using the -m option. For example, -m /usr/lib/autodir/autogroup.so.The module can be used with using the option. For example,All suboptions explained in managing home directories are the same for autogroup, except skel and noskel, as these are meaningless for the autogroup module. Additionally, there are other suboptions specific to autogroup. These are given below.All suboptions explained in are the same for , except and , as these are meaningless for the module. Additionally, there are other suboptions specific to These are given below.
Autodir options
In this section some of the options to Autodir are explained. Backup options are explained in the backup section.In this section some of the options to are explained. Backup options are explained in the
Backup options
These options are passed to Autodir to request backup support.These options are passed to to request backup support.The -b option takes a path to executable file as well as arguments to it. However, the arguments are interpreted for a sequence of %x characters and replaced with predefined strings as follows:The option takes a path to executable file as well as arguments to it. However, the arguments are interpreted for a sequence of %x characters and replaced with predefined strings as follows:
Examples
# autodir -d /home \ -m /usr/lib/autodir/autohome.so \ -t 1000 \ -f \ -o 'realpath=/autohome,level=1,skel=/etc/skel' \ -l /var/run/autodir.pid
# autodir -d /home \ -m /usr/lib/autodir/autohome.so \ -t 300 \ -b '/bin/tar cf /tmp/%N%F.tar %L' \ -w 600 \ -o 'realpath=/tmp/autohome,level=2,noskel' \ -l /var/run/autodir.pid
# autodir -d /var/abase/ \ -m /usr/lib/autodir/autogroup.so \ -t 300 \ -b '/bin/tar cf /tmp/%N%F.tar %L' \ -w 86400 \ -o 'nopriv,nosetgid,realpath=/var/realbase,level=0'
RPM specific
Autodir can be installed from rpms as follows: can be installed from rpms as follows:
# rpm -ivh autodir-0.28-4.i386.rpm
When installed from rpms, two startup scripts are provided: /etc/rc.d/init.d/autohome and /etc/rc.d/init.d/autogroup. The first one is for starting Autodir with the autohome module, the second for starting with the autogroup module.When installed from rpms, two startup scripts are provided:
/etc/rc.d/init.d/autohome and
/etc/rc.d/init.d/autogroup
. The first one is for starting with the module, the second for starting with the module.The script configuration files /etc/sysconfig/autohome and /etc/sysconfig/autogroup can be used to specify what options can be passed to Autodir.The script configuration files
/etc/sysconfig/autohome and
/etc/sysconfig/autogroup
Further Information
Mailing list for autodir http://lists.sourceforge.net/mailman/listinfo/intraperson-autodir.
[http://lists.sourceforge.net/mailman/listinfo/intraperson-autodir http://lists.sourceforge.net/mailman/listinfo/intraperson-autodir] http://lists.sourceforge.net/mailman/listinfo/intraperson-autodir.Official website is at http://www.intraperson.com/autodir/.Official website is at [http://www.intraperson.com/autodir/ http://www.intraperson.com/autodir/] http://www.intraperson.com/autodir/.Autofs mailing list http://linux.kernel.org/mailman/listinfo/autofs.Autofs mailing list [http://linux.kernel.org/mailman/listinfo/autofs http://linux.kernel.org/mailman/listinfo/autofs] http://linux.kernel.org/mailman/listinfo/autofs.The Automount HOWTO can be found at http://www.tldp.orgThe Automount HOWTO can be found at [http://www.tldp.org http://www.tldp.org] http://www.tldp.orgAutofs Hacking http://www.goop.org/~jeremy/autofs.Autofs Hacking [http://www.goop.org/~jeremy/autofs/ http://www.goop.org/~jeremy/autofs] http://www.goop.org/~jeremy/autofs.
![[LDP]](/moin_static184/ldp/tldp.png)
