IceWalkers.com - Linux Software downloads and news
Name : Password :
Linux SoftwareLinux RPMLinux HowtosLink UsAboutAdvertise

HOWTOs

Search Howtos :Match :

18. 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.

To load the autohome module with Autodir, use the -m option. For example, -m /usr/lib/autodir/autohome.so.

NoteUser/home matching
 

When an application tries to access a home directory, that home directory is used to check if there is any user with the same user name as the directory name being accessed. If a user name exists, then the home directory is created. Otherwise the message "no such file or directory" is reported back to the application.

NoteUser accounts
 

Autohome does not deal with the creation of user accounts on local systems, in LDAP or in any other database. It only deals with creating home directories once these accounts exist and are imported to the local system from databases like LDAP and NIS.

ImportantLimitations
 

It is worth mentioning one limitation of the autohome module. It expects that user name and home directory are related to each other. For example, for user user1 the home directory should be /home/user1 or /some/directory/name/user1 but not /some/directory/name/userhome1. This can be supported but it will be a burden on system resources as each password entry has to be examined from first to last.

NoteKnowing when not to use autohome
 

If the existing user password database is such that user home directories are distributed under different base directories, for example /home/class1/user1, /home/class2/user2332, then autohome configuration becomes complicated and is not recommended.

18.1. 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.

What are the virtual base directory and the real base directory in the context of the autohome 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 /home will become the virtual base directory.

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.

In 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.

The Autodir option -d is used to specify the virtual base directory. For example: autodir -d /home assumes that /home is the virtual base directory.

It 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.

18.2. Directory organization

Refer to directory organization under the real base directory 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.

18.3. 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 noskel can be used with -o to indicate not to copy any skeleton files to the home directories when these are created.

18.4. Example

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.

If /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.

Assuming that the autohome module is located in /usr/lib/autodir/autohome.so, this module can be loaded with autodir as -m /usr/lib/autodir/autohome.so. 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.

With all these options autodir 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.

Search Howtos :Match :
Inkscape 0.47
Vector graphic editor for SVG
DeleGate 9.9.6-pre5
Proxy server which runs on multiple platforms
Nano 2.1.99pre2
Emulate Pico while also offering a few enhancements.
My Money 2.0.49
Personal financial software
Linux Kernel 2.6 2.6.32-rc8
Linux Kernel
GCstar 1.5.0
Personal collections manager
ImageMagick 6.5.7.9
ImageMagick image processing studio
BibleTime 2.4
Bible study software for Linux / KDE
Tellico 2.1.1
Collection manager for books, music, videos, and bibliographies
Totem 2.28.4
Movie player for Gnome
Free IT Magazines, White Papers, eBooks, and more !
Oracle Magazine

Contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more.

Vulnerability Management for Dummies

Get all the Facts and See How to Implement a Successful Vulnerability Management Program.

Website Magazine

Has tapped premier talent in the Internet industry for our content and each and every issue will contain practical advice and insights for website owners.

Linux Software Map
Find Linux RPM
Best Rated Linux Software
Most Rated Linux Software
Linux Distributions
Linux Howtos
Quick Survey

Please take our survey and help us improve our website to serve you better.

Thank you.
Linux Software
Linux / IT Resources
Site Resources
Google
Privacy Policy
Contact Us
Submit Software
Advertising info