[Ubuntu] 00. How to configure Samba in Ubuntu 12.04
achishis2 edited this page Mar 18, 2015
·
3 revisions
Install necessary Packages
$ sudo apt-get install samba samba-common
$ smbd --version
$ sudo apt-get install python-glade2 system-config-samba
Check the name of window's Workstation domain
c:> net config workstation
Backup the smb.conf file, and create the new one:
$ sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.bak
$ sudo vi /etc/samba/smb.conf
#============== Global Settings ======================
[global]
workgroup = DM
server string = TK's Samba Server %v
netbios name = ubuntu
security = user
map to guest = bad user
dns proxy = no
#=============== Share Definitions ==================
[public]
path = /home/tk/z/public
browsable =yes
writable = yes
guest ok = yes
read only = no
create mask = 0755
directory mask = 0755
[private]
path = /home/tk/z/private
valid users = @smbgrp
browsable = yes
writable = yes
guest ok = no
create mask = 0755
directory mask = 0755
[workspace]
path = /home/tk/workspace
browsable =yes
writable = yes
guest ok = yes
read only = no
create mask = 0755
directory mask = 0755
$ sudo mkdir /home/tk/z/public
$ sudo chmod 777 /home/tk/z/public
$ sudo addgroup smbgrp
$ sudo mkdir /home/tk/z/private
$ sudo chown -R tk.smbgrp /home/tk/z/private
$ sudo chmod 770 /home/tk/z/private
$ sudo adduser tk smbgrp
Adding user `tk' to group `smbgrp' ...
Adding user tk to group smbgrp
Done.
$ sudo smbpasswd -a tk
New SMB password:
Retype new SMB password:
Restart Samba server
$ sudo service smbd restart
$ sudo testparm
http://rbgeek.wordpress.com/2012/04/25/how-to-install-samba-server-on-ubuntu-12-04/