Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22

Thread: samba sharing

  1. #11
    Join Date
    Mar 2013
    Beans
    31

    Re: samba sharing

    Alright, this is odd. I haven't changed anything, the only thing I've done is restart the server, maybe you need to restart the machine if you meddle with the sharing over samba?

    Now, Question is. is "others" having access to write or tamper with anything or is it just group1 that has rights to do so?

    And wow, thank you for your so thourough help

  2. #12
    Join Date
    Dec 2009
    Beans
    5,376

    Re: samba sharing

    If we are still talking about /home/creepwood/media then everyone and your Aunt Tilly can pretty much do whatever they want if they go through the [media] share.

    But no one can get to /home/creepwood/media unless they have a samba password if they go through [home]. And even if they did have a password Samba not Linux will prevent them from writing to the media folder regardless of it's Linux permissions - unless they are creepwood.

  3. #13
    Join Date
    Mar 2013
    Beans
    31

    Re: samba sharing

    Alright, the [home] share is all good then but I'm concerned about the [media] share. What do I need to do to not make that possible?

  4. #14
    Join Date
    Dec 2009
    Beans
    5,376

    Re: samba sharing

    If this is still true you can reverse the roles Samba and Linux usually play in these cases:
    drwxrwxrwx 15 creepwood media 4096 May 3 00:17 /home/creepwood/media
    Do not allow guest access but do "Allow others to create and delete files in this folder". This will cause everyone to have to provide credentials to gain access but it also allows Samba to know who everyone is.

    Now change the permissions to 775:
    Code:
    sudo chmod 775 /home/creepwood/media
    Now the "ls -dl" command for tht folder should read:
    drwxrwxr-x 15 creepwood media 4096 May 3 00:17 /home/creepwood/media
    Creepwood and members of the "media" group will be allowed write access.
    Everyone else can only read.

  5. #15
    Join Date
    Mar 2013
    Beans
    31

    Re: samba sharing

    Thank you for your support, it really seem that i'm learning from this.

    However, I removed the guest access and I can't get gain access to media (the share) when using userB. I did try making a trial folder named test so that I don't have to mess with the live data of media. What I did was make a folder named "test" and I changed the group to media and I changed the rights for it to 775. Then I added a share for it, only with "allow others to create...", it asked me a question about controlling the share. I said yes (and it changed the rights for the folder to 777). When I tried to access it from windows it's asking for credentials, I supply my userB credentials, but it won't accept.

    the net usershare info --long gives

    [test]
    path=/home/creepwood/test
    comment=
    usershare_acl=Everyone:F,
    guest_ok=n



    I'm not haxxor but I get a feel that it has something to do with the folder being in creepwoods home folder.

  6. #16
    Join Date
    Dec 2009
    Beans
    5,376

    Re: samba sharing

    Then you didn't add UserB to the samba password database:
    Code:
    sudo smbpasswd -a UserB
    And you didn't add UserB to the "media "group":
    Code:
    sudo gpasswd -a UserB media

  7. #17
    Join Date
    Mar 2013
    Beans
    31

    Re: samba sharing

    Alright I tried this, and it seems to work, I haven't tried as an "other" user yet, but when I enter as userB (group member of media) I can enter media folder, when I try to enter a folder in media where rights are set to 700 userB can't enter, which is what I wanted. I'll try as other further on.

    I can't thank you enough for helping me with this issue. I tried Linux several times before as my workstation but gotten so annoyed that I can't get everything to work right away, I do alot of different things I didn't have pation enough to deal with it. So five months ago I moved in with a friend of mine that's really good with this and I gave it a try, as a server, not workstation and he helped me immensly, but I moved to my own place a month ago so I'm on my own again

    That last part, with the smbpasswd, can you explain that i little bit in laymans terms. You added the user xbmc to a samba database, is that of users that should be able to connect with a samba password? If that's so, how come it has worked for my user creepwood right of the bat from my windows computer?

  8. #18
    Join Date
    Dec 2009
    Beans
    5,376

    Re: samba sharing

    Quote Originally Posted by creepwood View Post
    That last part, with the smbpasswd, can you explain that i little bit in laymans terms. You added the user xbmc to a samba database, is that of users that should be able to connect with a samba password? If that's so, how come it has worked for my user creepwood right of the bat from my windows computer?
    It's really just like Windows except Linux differentiates between a local user and a network user whereas in Windows there is only THE user.

    If you want user: morbius to provide credentials to gain access to a samba service you need to:

    ** Create a local user called morbius on the Linux server itself.
    ** Then you need to tell Samba that the local user morbius is a samba user. You do that with the smbpasswd command.

    As far as the user creepwood working without you doing the smbpasswd , one explanation is that you have the following package installed: libpam-smbpass

    It's an absolutely insane little utility that has only one function: At every boot it makes sure the local user is added to the samba user database and makes the samba password match the local user's login password automatically. I usually remove the package if it got installed somehow since it has no place in a home network.

  9. #19
    Join Date
    Mar 2013
    Beans
    31

    Re: samba sharing

    Thank you immensly for all the help.

    Everything has worked for what I've been doing until today, when I tried to connect as "other". It asked for username and password. What kind of options do I have to be able to connect as "other"?

  10. #20
    Join Date
    Dec 2009
    Beans
    5,376

    Re: samba sharing

    None. You've created a share the requires credentials to gain access.

Page 2 of 3 FirstFirst 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
  •