📚 LinuxDocs
Topics:
All Pages8021X HOWTOACP ModemACPI HOWTOADSL Bandwidth Man..ATA RAID HOWTOATM Linux HOWTOAX25 HOWTOAccessibility Dev ..Accessibility HOWTOAdv Bash Scr HOWTOAdv Routing HOWTOAntares RAID sparc..Apache Compile HOWTOApache WebDAV LDAP..Assembly HOWTOAstronomy HOWTOAthlon Powersaving..Authentication Gat..Autodir HOWTOAviation HOWTOAvr Microcontrolle..BRIDGE STP HOWTOBTTVBackspaceDeleteBandwidth Limiting..Bangla HOWTOBash Prompt HOWTOBattery PoweredBelarusian HOWTOBelgian HOWTOBeowulf HOWTOBocaBogoMipsBootdisk HOWTOBridgeC++ dlopenC C++Beautifier HO..C editing with VIM..CDROM HOWTOCDServer HOWTOCable ModemCaudium HOWTOClone HOWTOCompaq Remote Insi..Compaq T1500 HOWTOConexant+Rockwell ..Cryptoloop HOWTODB2 HOWTODHCPDSL HOWTODVD Playback HOWTODebian Binary Pack..Debian JigdoDebian and Windows..Disk Encryption HO..Disk on Chip HOWTODocBook Demystific..DocBook InstallDocBook OpenJade S..Ecology HOWTOEmacspeak HOWTOEncourage Women Li..Encrypted Root Fil..Euro Char SupportEvent HOWTOFedora Multimedia ..Finnish HOWTOFirewall PiercingFlash Memory HOWTOFont HOWTOFramebuffer HOWTOGCC HOWTOGIS GRASSGlibc Install HOWTOHOWTO HOWTOHOWTO INDEXHP HOWTOHandspring VisorHard Disk UpgradeHardware HOWTOHighQuality Apps H..Home Electrical Co..IBM7248 HOWTOIO Perf HOWTOIP AliasIP Masquerade HOWTOIRCImplement Sys Call..Indic Fonts HOWTOInfrared HOWTOIngresII HOWTOInstall StrategiesInstallation HOWTOInstallfest HOWTOIntkeybItalian HOWTOJabber Server Farm..JavaStation HOWTOKerberos Infrastru..Kernel HOWTOKerneldKodak Digitalcam H..LDAP HOWTOLDP Reviewer HOWTOLILO crash rescue ..LVM HOWTOLeased LineLegoLinksys Blue Box R..Linux+Win95Linux+Win9x+Grub H..Linux+Windows HOWTOLinux Complete Bac..Linux Crash HOWTOLinux Gamers HOWTOLinux Modem SharingLinux Promise RAID..Linux i386 Boot Co..LinuxGL QuakeWorld..Lotus DominoR5MILO HOWTOMMBase Inst HOWTOMP3 CD BurningMail User HOWTOMajordomo MajorCoo..Man PageMasquerading Simpl..Medicine HOWTOMindTerm SSH HOWTOMobile IPv6 HOWTOMock MainframeModule HOWTOModulesMotorola Surfboard..Mozilla OptimizationMulti Distro DevNCURSES Programmin..NFS HOWTONFS Root Client mi..NIS HOWTONetMeeting HOWTONetwork boot HOWTONvidia OpenGL Conf..OLSR IPv6 HOWTOOnline Troubleshoo..Oracle 9i Fedora 3..PA RISC Linux Boot..PCTel MicroModem C..PHP Nuke HOWTOPPP HOWTOPagerPalmOS HOWTOPartitionPartition Mass Sto..Partition Mass Sto..Partition RescuePine ExchangePortSlavePost Installation ..Postfix Cyrus Web ..Pre Installation C..Print2WinPrinting HOWTOProcess AccountingProgram Library HO..Proxy ARP SubnetQmail ClamAV HOWTOQmail VMailMgr Cou..Querying libiptc H..RPM HOWTOReading List HOWTORedHat CD HOWTOReliance HOWTORemote BridgingRemote Serial Cons..SCSI 2.4 HOWTOSCSI Generic HOWTOSLIP PPP EmulatorSRM HOWTOSSL Certificates H..Scanner HOWTOScientific Computi..Scripting GUI TclTkSecure CVS PserverSecure Programs HO..Security HOWTOSecurity Quickstar..Security Quickstar..Serial Laplink HOWTOSerial Programming..Slovak HOWTOSmall MemorySmart Card HOWTOSoftware Proj Mgmt..Software Release P..Sound HOWTOSpam Filtering for..Speech Recognition..SquashFS HOWTOSybase ASA HOWTOSybase ASE HOWTOSybase PHP ApacheTCP Keepalive HOWTOTamil Linux HOWTOTimePrecision HOWTOTimeSys Linux Inst..Token RingTraffic Control HO..Traffic Control tc..UPS HOWTOUnix Hardware Buye..Unix and Internet ..UpgradeUsenet News HOWTOUser Authenticatio..VB6 to TclVMS to Linux HOWTOVPN HOWTOValgrind HOWTOVideoLAN HOWTOVim HOWTOVirtual WebWebcam HOWTOWikiText HOWTOWindows Newsreader..Wireless Link sys ..Wireless Sync HOWTOXDM XtermXDMCP HOWTOXFree Local multi ..XFree86 HOWTOXFree86 R200XFree86 Second MouseXFree86 Video Timi..XML RPC HOWTOXWindow Overview H..XWindow User HOWTOXinerama HOWTOXterminalsHtml singleI810 HOWTOLibdc1394 HOWTOOpenMosix HOWTOPhhttpd HOWTOPpp sshText

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 .:: sp.ucn.edu.co ::. autohome module, which deals with specifics of home directory creation, is used. .:: www.redsea.gov.eg ::.

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 .:: telegra.ph ::. .:: kitsu.app ::. /home but instead mount it somewhere else and make it the [MDN Docs: Traefik] [Wiki: Artificial intelligence] 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 .:: podcasts.apple.com ::. 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. .:: 4fund.com ::.

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. .:: podcasts.apple.com ::.

Share or Research:

Share on FB Post to X LinkedIn 🤖 Ask AI about this