Rechercher

Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 6. Enabling Custom Home Directories Using authconfig

download PDF
If LDAP users have home directories that are not in /home and the system is configured to create home directories the first time users log in, then these directories are created with the wrong permissions.
  1. Apply the correct SELinux context and permissions from the /home directory to the home directory that is created on the local system. For example:
    [root@server ~]# semanage fcontext -a -e /home /home/locale
  2. Install the oddjob-mkhomedir package on the system.
    This package provides the pam_oddjob_mkhomedir.so library, which the authconfig command uses to create home directories. The pam_oddjob_mkhomedir.so library, unlike the default pam_mkhomedir.so library, can create SELinux labels.
    The authconfig command automatically uses the pam_oddjob_mkhomedir.so library if it is available. Otherwise, it will default to using pam_mkhomedir.so.
  3. Make sure the oddjobd service is running.
  4. Run the authconfig command and enable home directories. In the command line, this is done through the --enablemkhomedir option.
    [root@server ~]# authconfig --enablemkhomedir --update
    In the UI, there is an option in the Advanced Options tab (Create home directories on the first login) to create a home directory automatically the first time that a user logs in.
    Home Directory Option

    Figure 6.1. Home Directory Option

    This option is beneficial with accounts that are managed centrally, such as with LDAP. However, this option should not be selected if a system like automount is used to manage user home directories.
If home directories were created before the home directory configuration was changed, then correct the permissions and SELinux contexts. For example:
[root@server ~]# semanage fcontext -a -e /home /home/locale
# restorecon -R -v /home/locale
Red Hat logoGithubRedditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez leBlog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

© 2024 Red Hat, Inc.