LOGO

Share Ubuntu Home Directories with Samba - Easy Guide

January 7, 2007
Share Ubuntu Home Directories with Samba - Easy Guide

Automated Home Directory Sharing with Samba Server

Samba Server provides a convenient method for automatically sharing user home directories. This functionality eliminates the need for individual share creation for each user account, streamlining administration.

Prior to proceeding, ensure that the Samba server software is successfully installed on your system.

Configuring smb.conf for Home Directory Shares

To enable home directory sharing, the Samba configuration file, smb.conf, must be modified. This is achieved using the following command:

sudo gedit /etc/samba/smb.conf

Within the smb.conf file, locate the share definitions section. Adjust it to reflect the following configuration:

#======================= Share Definitions =======================

# Un-comment the following (and tweak the other settings below to suit)

# to enable the default home directory shares. This will share each

# user's home directory as \\server\username

[homes]

comment = Home Directories

browseable = yes

# By default, \\server\username shares can be connected to by anyone

# with access to the samba server. Un-comment the following parameter

# to make sure that only "username" can connect to \\server\username

valid users = %S

# By default, the home directories are exported read-only. Change next

# parameter to 'yes' if you want to be able to write to them.

writable = yes

These settings define the parameters for accessing and utilizing the shared home directories.

Accessing Shares from Windows

Once the configuration is complete, Windows users can map a network drive using the following share path format:

\\ubuntumachine\username

For instance, if your Ubuntu server is named 'ubuntuserv' and the user account is 'geek', the corresponding share path would be \\ubuntuserv\geek. This allows seamless access to the user's home directory from a Windows environment.

Important Note: The writable = yes setting allows users to modify files within their home directories. Consider security implications before enabling this option.

#Ubuntu#Samba#file sharing#Windows#Linux#home directory