The smbconf Homes Section

The homes section is a special share section. It tells smbd to permit users to access their own home directories through SMB. Unlike the other share sections covered later, the homes section does not tell smbd the specific path of the directory being shared. Instead, smbd uses the home directory from the /etc/passwd file based on the username of the user requesting the share. It is this special section that makes a user's home directory on the server available to the user on their PC. The homes section from the Red Hat example is


comment = Home Directories browseable = no writable = yes valid users = %S create mode = 0664 directory mode = 0775

The configuration parameters defined in this homes section are the following:

comment Provides a description of the share that is displayed in the comment field of the Network Neighborhood window when this share is viewed on a Microsoft Windows system.

browsable Specifies whether or not all users may browse the contents of this share. no means that only users with specific permission (that is, the correct user ID) are allowed to browse this share. yes means all users, regardless of UID, can browse the share. This parameter only controls browsing; actual access to the contents of the share is controlled by standard Linux file permissions.

writable Specifies whether or not files can be written to this share. If yes, the share can be written to. If no, the share is read-only. This parameter defines the actions permitted by Samba. Actual permission to write to the directory defined by the share is still controlled by standard Linux file permissions.

valid users Defines the users who are allowed to use this share. In the Red Hat example, the service name (%S) is used.

create mode Defines the file permission used when a file is created in this share. (See the discussion of file permission earlier in this chapter.)

directory mode Defines the directory permissions used when a directory is created in this share.

Both the global and homes sections described are included in the sample Red Hat configuration. Having an understanding of the elements used to create those sections, you're ready to create your own share section in the smb.conf file.

Was this article helpful?

0 0

Post a comment