We help IT Professionals succeed at work.

Samba File Share

blnukem
blnukem asked
on
Medium Priority
228 Views
Last Modified: 2013-12-16
Hi All

I'm new to Linux so please be patient with me. I set up a Fedora 7 server with widows file sharing set up on a new installation. What I need to know is how to set up a public folder on this machine so that network user1 and user2 can share.
Comment
Watch Question

Pétur Ingi EgilssonSoftware Engineer -- Consultant

Commented:
[storage]
comment = Storage (public files)
writable = no
path = /usr/files/storage
public = yes
only guest = yes
guest account = nobody
browsable = yes
Pétur Ingi EgilssonSoftware Engineer -- Consultant

Commented:
You might want to set "writable = yes"

Author

Commented:
OK

Not to sound to stupid, but what do I do with that? Please remember I'm new to Linux.
Pétur Ingi EgilssonSoftware Engineer -- Consultant

Commented:
[storage]  <- this is the "share name"
comment = Storage (public files) <- this is the "comment"
writable = no <- this says the share is writable for those with premission
path = /usr/files/storage <- this is the path to the share on the local folder on the server
public = yes <- this says the share is public
only guest = yes <- says the share is only for guests, eg. you cannot login to it with your username\password
guest account = nobody <- all guests will be treated as "nobody", nobody in unix means no user account
browsable = yes <- the share can be seen in the available share list if you do \\servername\ from a windows machine.

Commented:
First of all it would be helpful to know what Linux distro & Desktop environment do you use. Second, what type of sharing will you prefer, even in Windows there are different types of security related to sharing folders. There are nice GUI frontend for newbies, like Control Center in KDE.

Author

Commented:

olehb

Linux distro: Fedora 7
Desktop environment: KDE

Windows types security: I'd like to use the simplest

Commented:
The simplest is "share" security. If you expect connections from user that don't exist on the UNIX box then use security = share. You should also use security = share if you want to mainly setup shares without a password (guest shares). This is commonly used for a shared printer server. However "user" level is also not so complex.
Preliminary steps:
1. Locate and launch Control Center. I use SUSE Linux so can't say exactly where to find it, but should be pretty straightforward, somewhere in configuration menu.
2. Go "Internet & Network" -> "Samba". Here you might need use you root password to enter "Administration mode".
3. Fill name of workgroup you are going to use, choose security level "share" or "user".
4. If you use "user" level, enable option "Allow guest logins" as well.
5. Go "File sharing" menu and activate "Simple sharing".
6. Launch command as root (via sudo or su): /etc/init.d/smb restart

Below is link with similar description.
http://docs.pclinuxos.com/SettingUpFileSharing
Software Engineer -- Consultant
Commented:
#As root open up the file /etc/samba/smb.conf
su  <- then enter the root password
nano /etc/samba/smb.conf  <- if nano does not work, try pico, if pico does not work use you can launch "gedit" and browse the file
#append this to the smb.conf file

[storage]
comment = Storage (public files)
writable = no
path = /usr/files/storage  <- Change this to the directory you would like to share
public = yes
only guest = yes
guest account = nobody
browsable = yes

#save and exit, the program your using to edit the file

#next you need to restart two service, `smb` and `nmb`, as root type:
service smb restart
service nmb restart

#your share is now up and running

Explore More ContentExplore courses, solutions, and other research materials related to this topic.