Archive for the ‘ Samba ’ Category

Setup Samba Shares on Ubuntu Server 10.04

First install Samba (all commands should be preceded with sudo, but for the sake of readability it is ommitted):

johndoe@server:~$ apt-get install samba

Then modify the config file in /etc/samba/smb.conf by changing the workgroup to yours (workgroup = YOUR_WORKGROUP) and uncommenting security = user.

Now create a share:

[SHARE_NAME]
comment = A comment about this share
path = /PATH/TO/SHARE
valid users = USER
hide files = /lost+found/
read only = No
browsable = Yes
writable = Yes

All options are explained in the smb.conf man(5) page.

I think a samba user does not necessarily need a UNIX account, but I usually create one to chown dedicated shares.

johndoe@server:~$ adduser --no-create-home --disabled-login USER
johndoe@server:~$ usermod -p PASS USER

According to Google UNIX Samba passwords should stay in sync, but that didn’t work out for me. So set the user password again:

johndoe@server:~$ smbpasswd -a USER

Now restart the server (service smbd restart) and point the Explorer to your machines IP. That’s all folks. 😉

References