Linux Tutorial: Adding file shares on Ubuntu Linux without using Nautilus

viridian

Disciple
A quick and dirty way to create user shares with Samba on Linux. I've tested this with Lucid (10.04), YMMV.

Samba has this nice concept of usershares i.e. instead of editing smb.conf to add shares etc you can create a file in:

/var/lib/samba/usershares/

using your normal user privileges (i.e. no "sudo" required)

Samba should be installed and running for this to work.

Open up your favourite text editor and go
Code:
$ vim /var/lib/samba/usershares/mysharedsongs

Add something similar to the following in that file
Code:
 #VERSION 2
#add the path to be shared 
  path=/HDD2/Music
  comment=
  usershare_acl=S-1-1-0:R
#allow people without Samba accounts to access?
  guest_ok=y

This is a read only share, but you can modify the usershare_acl to change it to RW (I don't remember the change offhand).
 
Back
Top