LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Setting up Samba for file sharing (https://www.linuxquestions.org/questions/linux-newbie-8/setting-up-samba-for-file-sharing-924663/)

rmcellig 01-19-2012 03:28 PM

Setting up Samba for file sharing
 
I am using a Full install of Puppy Linux 5.2.8. I just installed samba 3.5.6 lucid. Can someone please help me set up samba or direct me to an easy to follow step by step guide on how to set it up so that I can share files with my Mac and PC and learn something along the way?

I see so many guides out there to set up Samba but I am not sure which one to use. I would really like something that is geared towards newbies to Linux or maybe someone on this form can guide me?

Thanks!

T3RM1NVT0R 01-19-2012 03:45 PM

@ Reply
 
Hi rmcellig,

Here are the documentations that will help you:

1. http://puppylinux.org/wikka/Samba (Parent Link)
2. http://www.murga-linux.com/puppy/viewtopic.php?t=60981 (Links you should look at)
3. http://www.murga-linux.com/puppy/viewtopic.php?t=60836 (Links you should look at)

rmcellig 01-19-2012 03:52 PM

Thanks! I already saw those links and took a look at them and got totally confused. I'm sorry but I need a step by step guide that is drop dead simple to use if there is such a thing. I don't mind installing Samba in stages. I am trying this on my test PC so that once I do install and configure Samba onece, I should be good to go on the other computers on my LAN.

T3RM1NVT0R 01-19-2012 04:12 PM

@ Reply
 
You're welcome.

Could you please let us know which part in those links you are finding confusing. Those links explain how to setup samba on puppy linux step by step. I can give you pointers. I am not sure what type of step by step guide you are looking for.

Have a look at the following and it might be helpful:

1. Make sure that you have got samba package installed.
2. Take a backup of smb.conf file and edit it as follows:
Code:

        workgroup = SMBGROUP /* You can define workgroup for your samba server */
        server string = My Samba Server /* Optional. Like I specified My Samba Server you can specify something like Puppy Samba */
       
        netbios name = MYSERVER /* Hostname of your server. Again optional if you don't want to define comment it out */
       
        interfaces = lo eth0 eth1 192.168.1.0/24 172.168.1.0/24 /* Interfaces on which samba will be listening on */
        hosts allow = 192.168.1.0/24 /* Define the network that you want to allow to access your samba server */


# ----------------------- Standalone Server Options ------------------------
#
# Scurity can be set to user, share(deprecated) or server(deprecated)
#
# Backend to store user information in. New installations should
# use either tdbsam or ldapsam. smbpasswd is available for backwards
# compatibility. tdbsam requires no further configuration.

        security = user /* Keep these settings as it is */
        passdb backend = tdbsam /* Keep these settings as it is */

[common]
        comment = common share
        path = /common
        browseable = yes
        valid users = testuser
        writable = no

My share name is [common]. Path is /common on my samba server. It is browseable. Valid users are the users who are allowed to access this share. If you want to allow a group of people to access the share then put valid users = @groupname

You can also specify read list = username or @groupname (user/group which you want to allow read only access) write list = username or @groupname (user/group which you want to allow read/write access)

3. Save the configuration file and run testparam to check smb.conf file syntax.
4. Make sure you allow your firewall to allow samba traffic (ports 139,445,137 and 138)
5. Set up users account for samba by running smbpasswd -a <username> /* This command is used to add the users who are allowed to access samba with the password mentioned after running smbpasswd */
6. Restart smb and nmb services.
7. Access samba share either via command line (by mounting it) or via explorer.

rmcellig 01-19-2012 04:23 PM

I just installed samba 3.5.6 lucid. I am slowly starting to understand it. Takes me a while but once I see how it works, I am OK. I created a directory in my root folder called srv and inside that I created a folder called Downloads. How can I make sure that I have the correct permissions set for the Downloads folder? I can post back the results here.

T3RM1NVT0R 01-19-2012 04:58 PM

@ Reply
 
Run the following command:

Code:

ls -l /srv
and it should show the output similar to:

Code:

drwxrw-rwT. 2 root root 4096 Jan  8 12:57 Downloads

rmcellig 01-19-2012 06:44 PM

This is what the output looks like:

sh-4.1# ls -l /srv
total 4
drwxrwxrwt 2 root root 4096 2012-01-19 17:14 Downloads
sh-4.1#

T3RM1NVT0R 01-20-2012 12:42 AM

@ Reply
 
The output looks fine to me.


All times are GMT -5. The time now is 10:53 PM.