1.20.2015

Install and setup Samba on Ubuntu

Got from here.
1. Install samba
$ sudo apt-get update
$ sudo apt-get install samba

2. Set a password for samba user
$ sudo smbpasswd -a samdc
New SMB password:
Retype new SMB password:
Added user samdc.

3. Create a directory to be shared
$ sudo mkdir /data1/staging

4. Make sure user has access
$ sudo chown samdc:samdc /data1/staging

5. Make a backup copy of smb.conf
$ cp /etc/samba/smb.conf ~

6. Edit smb.conf
$ sudo vi /etc/samba/smb.conf
Add this to the very end of the file:
[staging]
path = /data1/staging
available = yes
valid users = samdc
read only = no
browseable = yes
public = yes
writable = yes

7. Restart samba
$ sudo service smbd restart

8. Check smb.conf for any syntax errors
$ testparm

9. To access network share
Linux:
smb://<HOST_IP_OR_NAME>/<folder_name>/
smb://10.42.0.1/staging/

Windows:
\\<HOST_IP_OR_NAME>\<folder_name>\
\\10.42.0.1\staging\

==============================================
hostname:mango, os:Ubuntu 14.10 Utopic Unicorn
==============================================
ASRock Z97 Extreme6 LGA 1150 Intel Z97 HDMI SATA 6Gb/s USB 3.0 ATX Intel Motherboard
Intel Core i7-4790 Haswell Quad-Core 3.6GHz LGA 1150 84W Desktop Processor Intel HD Graphics 4600
Team Xtreme 16GB (2 x 8GB) 240-Pin DDR3 SDRAM DDR3 2400 Desktop Memory
OCZ ARC 100 ARC100-25SAT3-240G 2.5" 240GB SATA III MLC Internal Solid State Drive
Western Digital WD Blue WD10EZEX 1TB 7200 RPM 64MB Cache SATA 6.0Gb/s 3.5" Internal Hard Drive
ENERMAX Ostrog GT ECA3280A-BR Black / Red Steel / Plastic ATX Mid Tower Computer Case

No comments:

Post a Comment