firedog@www:# sudo apt-get install samba smbfsWait till it finishes installation, then open the samba configuration file :
firedog@www:# sudo vim /etc/samba/smb.confFind this section in the file:
####### Authentication ####### # "security = user" is always a good idea. This will require a Unix account # in this server for every user accessing the server. See # /usr/share/doc/samba-doc/htmldocs/Samba-HOWTO-Collection/ServerType.html # in the samba-doc package for details. ; security = userUncomment the security line, and add another line to make it look like this:
security = user username map = /etc/samba/smbusersThis will set Samba to use the smbusers file for looking up the user list. Next we need to find the section below in the conf file and make it match with the following:
#=============== 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 = yesThis section allows Windows users to access Ubuntu user home directory. Now it is time to create a samba user
firedog@www:# sudo smbpasswd -aEnter the password upon request, next we’ll add that username to the smbusers file.
firedog@www:# sudo vim /etc/samba/smbusersAdd in the following line into the user file:
= ""Now try to access your ubuntu user directory by typing \\\\\\ at the address bar in the explorer, enter the username and password upon request, you should be able to see the files. Problem encountered: I can only setup one samba user to access from Windows machine, when I try to create a new user using the smbpasswd command, it always failed, more investigation is needed.