12.07.2015 Views

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

Red Hat Enterprise Linux 5 Administration Unleashed

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

304CHAPTER 13Network File SharingTo start the automount daemon, use the command service autofs start. To stop it, usethe command service autofs stop. If the service is already running when theauto.master file or any of the files it includes such as auto.misc is modified, use thecommand service autofs reload to force a reread of the configuration files. To configurethe system to start it at boot time, execute chkconfig autofs on as the root user.Samba File SharingSamba is the file-sharing protocol used by the Microsoft Windows operating system.Because some network environments include more than one operating system, <strong>Red</strong> <strong>Hat</strong><strong>Enterprise</strong> <strong>Linux</strong> provides a way to use alternative file-sharing methods. If only sharingbetween <strong>Linux</strong> and other UNIX variants, it is recommended that NFS be used instead.TIPFor additional information on Samba, refer to the /usr/share/doc/samba-/directory. Among other resources, it contains a PDF of the Samba-3 by Example book.Samba and SE<strong>Linux</strong>Samba file sharing is protected by SE<strong>Linux</strong>, a mandatory access control security mechanism.Refer to Chapter 23 for details on how SE<strong>Linux</strong> works.If SE<strong>Linux</strong> is set to the enforcing mode, the files shared via Samba must be labeled with thecorrect SE<strong>Linux</strong> security context. After configuring Samba to share a directory, execute thefollowing command to change the security context of the files in the shared directory:chcon -R -t samba_share_t If the directory is inside a home directory, you might need to set the security context ofthe entire home directory:chcon -R -t samba_share_t CAUTIONIf the filesystem is relabeled for SE<strong>Linux</strong>, the security context changes you make willbe overwritten. To make your changes permanent even through a relabel, refer to the“Making Security Context Changes Permanent” section in Chapter 23.Execute the following command to allow home directories or directories inside homedirectories to be shared:setsebool -P samba_enable_home_dirs=1

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!