I have three machines in a local network: mac, ubuntu and windows.
Ubuntu is used as a server, and I need quite often exchange files between mac and windows.
1: Install Samba
Ubuntu is used as a server, and I need quite often exchange files between mac and windows.
1: Install Samba
sudo apt-get update
sudo apt-get install samba
2: Create shared folder
mkdir -a ~/Documents/samba
It is also recommended to have this folder in /svr/samba/share. If you prefer this, you have to assure that the user has the right to do the operations in this folder.
3: Backup configuration file
sudo cp /etc/samba/smb.conf /etc/samba/sab.conf.backup
4: Edit configuration file
sudo vim /etc/samba/smb.conf
At the end of this file, add the following lines:
[share]
comment = Ubuntu File Server Shared
path = /home/user_name/Documents/samba
browsable = yes
valid users = user_name
guest ok = yes
read only = no
create mask = 0755
5: Set up a password for this account in Samba:
sudo smbpasswd -a user_name
Then, key in the password. It is suggested to use the same password as *unix Login.
Because I used a different password, it does not work.
6: Restart the samba:
sudo service smbd restart
7: Check syntax errors in smb.conf file:
testparm
8: Access Samba folder from Mac:
Go to Finder > Go > Connect to Server
In "Server Address", put the Ubuntu server's IP address with Samba protocol:
smb://10.173.178.65
Then, click on "Connect".
An authentication window will pop out and you have to key in the user name and password.
Then, you can browse/edit the files on the server.
9: Access Samba folder from Windows:
Open a Windows Explorer window, key in //ip_address/share (share is the name of the shared folder defined in the smb.conf file), and key in your account and password.