Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: File sharing among local accounts is not working for me, help!

  1. #1
    Join Date
    Dec 2009
    Beans
    100

    Question File sharing among local accounts is not working for me, help!

    What I've done:

    1. I installed "libpam-smbpass". Restarted.
    2. Opened the Properties window of the drive (partition) where the folder I want to share is located.
    3. In its Share tab, checked "Share this folder", and "Allow other to create..."

    Next, went to the other Ubuntu account to test it. The drive in question no longer pops up a window for me to enter the admin password. It just does nothing. Namely it doesn't open up.
    What am I missing?

    Btw, when I first attempted to share the folder, Ubuntu asked me if I wanted to install Samba, so I got it installed at this moment, then I restarted.


    JDL

    Thanks guys,
    JDL
    Last edited by javierdl; February 11th, 2014 at 05:57 PM.

  2. #2
    Join Date
    Sep 2013
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: File sharing among local accounts is not working for me, help!

    In Linux, you don't usually have to restart your computer when you finish installing/updating software/packages, you just restart their service. For example, to restart Apache you type: sudo service apache2 restart, which will then update as needed, or: sudo service samba restart, to restart the samba service.

    With Samba, you define share and set options, like authentication and permissions, and share your defined shares on your LAN.

    But I will go over a generic install, first we will need to install Samba (Which you've already done), then edit the config file, then restart the Samba services and we should be good!

    Code:
    sudo nano /etc/samba/smb.conf
    Scroll all the way to the bottom and type:
    Don't type the text in the parenthesis.
    Code:
    [NewShare}
    comment= My New Share
    path= /path/to/directory (Can be any path, ex. /home/chris/share)
    browseable= yes
    writeable= yes
    guest ok= yes
    read only= no
    Press "ctrl+x", and possibly type "yes" if it ask, to save the file.

    That will make an open share that anyone can access and put/take anything from it. We can lock it down and make it more secure if you want, just let me know and I will show you how to do that.

    Now we need to restart the samba service, type:
    Code:
    sudo service smbd restart
    
    and
    
    sudo service nmbd restart
    Here is a free online book of Samba that gets pretty detailed, so I would recommend looking over it,
    http://oreilly.com/openbook/samba/book/index.html

    That should get you up and running with a Samba defined share that anyone can access when they connect to your LAN, let me know if you have any troubles and I will help!

    Good luck,
    Chris
    "Ignorance is short-lived, and knowledge is forever."


  3. #3
    Join Date
    Sep 2013
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: File sharing among local accounts is not working for me, help!

    I was researching this more, and found a more up to date book for Samba that uses version 3:
    http://www.samba.org/samba/docs/using_samba/toc.html
    "Ignorance is short-lived, and knowledge is forever."


  4. #4
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: File sharing among local accounts is not working for me, help!

    Quote Originally Posted by javierdl View Post
    What I've done:

    1. I installed "libpam-smbpass". Restarted.
    2. Opened the Properties window of the drive (partition) where the folder I want to share is located.
    3. In its Share tab, checked "Share this folder", and "Allow other to create..."

    Next, went to the other Ubuntu account to test it. The drive in question no longer pops up a window for me to enter the admin password. It just does nothing. Namely it doesn't open up.
    What am I missing?

    Btw, when I first attempted to share the folder, Ubuntu asked me if I wanted to install Samba, so I got it installed at this moment, then I restarted.


    JDL

    Thanks guys,
    JDL
    There are many ways to share a folder using Samba. Some are easier than others. You are limited to non-root created shares (and the underlying directory) when you create Samba usershares (created using the GUI). This provides a method for a user to share directories under their home directory (/home/<user>). In fact this is why Samba developers created usershares in the first place.

    If you want to share a directory that is outside of your home directory then you need change the permissions of that folder. I'm not sure that a "Share this folder", and "Allow other to create..." command on a directory that you do not own or have permissions is allowed. I have all of my "public shared data" stored at /srv/samba. I used chmod and chgrp using sudo to create the proper ownership and permissions. Once that is done you can either create the share with the GUI or create a share by editing the /etc/samba/smb.conf file.

    I mention this so you understand that the are 2 ways to do what you want to do. For a noobie I would create the share in my home directory. Something like /home/<user>/samba/<directory_to_be_shared> would work. Then use the GUI to create the usershare.

    The traditional method requires that you understand sudo and permissions/ownership issues and the willingness to directly edit the smb.conf file to create the share. If you want to do this that I think this is appropriate for your use.

    The book that @tfrue has recommended is way out of date (2003) and mostly about Samba v2. The second release of the book was at the time when Samba v3 was being introduced. We are now at Samba v3.6. The book is not inaccurate, but it is outdated. It will have no information about SMB2 or SMB3 and the client package is now cifs-utils rather than smbfs. It is also mind numbing for someone who is just starting out. It is more like a reference book rather than a tutorial. In my opinion it's nice to have but it only make sense once you have a general idea how it all works anyway.

    Whichever method ( usershares or traditional edit of the smb.conf) we are here to help you.
    -BAB1

  5. #5
    Join Date
    Apr 2011
    Location
    Mystletainn Kick!
    Beans
    4,921
    Distro
    Ubuntu

    Re: File sharing among local accounts is not working for me, help!

    By locally, do you mean on the same machine or over a network?

    Edit: Nevermind, I didn't notice this is the networking sub-forum.
    But it seems strange that when you first tried sharing and it asked to install samba, that it didn't ask to also install the libpam-smbpass package as well.
    Those usually install together.(when using the share this folder method)
    Last edited by deadflowr; February 12th, 2014 at 05:14 AM.
    Splat Double Splat Triple Splat
    Earn Your Keep
    Don't mind me, I'm only passing through.
    Once in a blue moon, I'm actually helpful
    .

  6. #6
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: File sharing among local accounts is not working for me, help!

    Quote Originally Posted by deadflowr View Post
    ...it seems strange that when you first tried sharing and it asked to install samba, that it didn't ask to also install the libpam-smbpass package as well.

    Those usually install together.(when using the share this folder method)
    I think that libpam-smbpass started to be installed from 12.10 or 13.04 on. I have 12.04 on this workstation and it is not installed, even with Samba usershares being used.

    Code:
    ls -l /var/lib/samba/usershares
    total 8
    -rw-r--r-- 1 bab bab 117 Dec  6 17:41 2013_pix
    -rw-r--r-- 1 bab bab 113 Jan  3 12:09 2014_pix
    Last edited by bab1; February 13th, 2014 at 12:46 AM.
    -BAB1

  7. #7
    Join Date
    Dec 2009
    Beans
    5,482

    Re: File sharing among local accounts is not working for me, help!

    @bab1, Once again my apologies for my intrusion but this has to be fixed somehow because it's showing up all over the place .........
    Quote Originally Posted by tfrue View Post
    Code:
    [NewShare}
    comment= My New Share
    path= /path/to/directory (Can be any path, ex. /home/chris/share)
    browseable= yes
    writeable= yes
    guest ok= yes
    read only= no
    Press "ctrl+x", and possibly type "yes" if it ask, to save the file.

    That will make an open share that anyone can access and put/take anything from it.
    You do realize that as a general mini howto if someone follows your post verbatim it will not do what I've highlighted in blue, right? You are missing 1 and depending on how the folder being shared is used on the local server itself possibly 2 steps.

    The other thing that's wrong with that post is that you've completely ignored the fact that the user created a Samba Usershare as bab1 pointed out. If he did that and also followed your post we a situation where we have 2 different share definitions in 2 different places both telling samba to share the same folder and they may or may not conflict with each other forcing a cleanup by removing one or the other share.
    Last edited by Morbius1; February 12th, 2014 at 03:07 PM.

  8. #8
    Join Date
    May 2008
    Location
    SoCal
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: File sharing among local accounts is not working for me, help!

    Quote Originally Posted by Morbius1 View Post
    @bab1, Once again my apologies for my intrusion but this has to be fixed somehow because it's showing up all over the place .........

    You do realize that as a general mini howto if someone follows your post verbatim it will not do what I've highlighted in blue, right? You are missing 1 and depending on how the folder being shared is used on the local server itself possibly 2 steps.

    The other thing that's wrong with that post is that you've completely ignored the fact that the user created a Samba Usershare as bab1 pointed out. If he did that and also followed your post we a situation where we have 2 different share definitions in 2 different places both telling samba to share the same folder and they may or may not conflict with each other forcing a cleanup by removing one or the other share.
    No apologies needed. I only skimmed the reply when I saw that @tfrue recommended a book that is obviously outdated. My response was directed to the OP's points for the most part.

    I have come to the conclusion that I (we) can't cure all the incorrect responses. My wife says that if I continue to "tilt at windmills" I will become a bitter old man. I have to admit though -- the Barbarians are at the gate!
    Last edited by bab1; February 12th, 2014 at 05:43 PM.
    -BAB1

  9. #9
    Join Date
    Sep 2013
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: File sharing among local accounts is not working for me, help!

    You do realize that as a general mini howto if someone follows your post verbatim it will not do what I've highlighted in blue, right? You are missing 1 and depending on how the folder being shared is used on the local server itself possibly 2 steps.
    I don't think you realize it does make an open share. I just opened my server and created a share using the defined parameters and it worked. I will say that I did fail to mention changing the permissions on the /path/to/share, but other than that, that is what I missed. Perhaps I did give a bad example as you would have to uncomment the share home folder in the smb.conf file, but that open share works.

    Another thing you could do rather than call me out, is to post the corrections of the one or two mistakes that I made.

    Let me reiterate what I already posted in my first post, one thing I did fail to mention is that I don't know how to use the GUI version of Samba, so I did neglect the OP, but I was giving a generic installation on how to use Samba.
    But I will go over a generic install, first we will need to install Samba (Which you've already done), then edit the config file, then restart the Samba services and we should be good!
    Also, if you have been reading all the post that are coming up everywhere you would've noticed that I have stated many times I don't know or understand the GUI version of Samba.

    The other thing that's wrong with that post is that you've completely ignored the fact that the user created a Samba Usershare as bab1 pointed out. If he did that and also followed your post we a situation where we have 2 different share definitions in 2 different places both telling samba to share the same folder and they may or may not conflict with each other forcing a cleanup by removing one or the other share.
    Also, did you notice that bab1 posted the samba usershare information after I posted the generic installation? As I should've mentioned in my first post, I don't know how to use the GUI version of Samba, but I do know how to use the CLI version. I did neglect the OP, and you are right we don't want two shares pointing to the same share so isn't that why we come together to help everyone? The reason I'm here is to help others while learning just as much because I don't know it all and what you did was not beneficial to anyone.

    I have come to the conclusion that I (we) can't cure all the incorrect responses.
    You're right, but isn't that what this community is here for? I've used Linux for a little over a year now, I certainly don't know everything nor a great deal of things about it, but I'm learning just like everyone else because no one is an expert in every field.
    "Ignorance is short-lived, and knowledge is forever."


  10. #10
    Join Date
    Dec 2009
    Beans
    5,482

    Re: File sharing among local accounts is not working for me, help!

    The original post said this:
    Opened the Properties window of the drive (partition) where the folder I want to share is located.
    In its Share tab, checked "Share this folder", and "Allow other to create..."
    The user just created a Samba Usershare - this has nothing to do with bab1's post.

    If your objective was to create a guest share that allows anyone to add to, remove from, and edit all of it's content your post will not work. If you change permissions on the shared folder but leave the share definition as it is it will not work. If you want to see how it's done using the traditional way you should look at one of bab1's posts like this one under *** Public Share ***: http://ubuntuforums.org/showthread.p...8#post12915098

    But you know what? After reading the original post again:
    Next, went to the other Ubuntu account to test it. The drive in question no longer pops up a window for me to enter the admin password. It just does nothing. Namely it doesn't open up.
    admin password? Other user account?

    Um ... There's a good chance it's just me but I don't think this is a network file sharing question. I think he is trying to create a shared folder that all local users have access to not users across the lan. Or it's a partition that's not automounting and there are concurrent users trying to access it, or .....
    Last edited by Morbius1; February 12th, 2014 at 11:03 PM.

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •