Page 7 of 106 FirstFirst ... 567891757 ... LastLast
Results 61 to 70 of 1059

Thread: HOWTO: Setup Samba peer-to-peer with Windows

  1. #61
    Join Date
    Mar 2006
    Location
    Kitakyushu Japan
    Beans
    9,362
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: HOWTO: Setup Samba peer-to-peer with Windows

    you sir/madam are my personal hero.

    you LITERALLY saved my job. thank you.
    Last edited by dmizer; July 30th, 2006 at 07:06 AM.

  2. #62
    Join Date
    Mar 2006
    Location
    Kitakyushu Japan
    Beans
    9,362
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: HOWTO: Setup Samba peer-to-peer with Windows

    and just ran into my first snag. can't figure out how to add multiple users.

    it works for the primary user on the system, but if i add users via the following example:
    Code:
    sudo useradd -s /bin/true NEW_USERNAME
    sudo smbpasswd -L -a NEW_USERNAME
    sudo smbpasswd -L -e NEW_USERNAME
    i can't get the additional user to work.

    for this section of my samba.conf file:
    Code:
    [MyFiles]
        path = /media/samba/
        browseable = yes
        read only = no
        guest ok = no
        create mask = 0644
        directory mask = 0755
        force user = YOUR_USERNAME
        force group = YOUR_USERGROUP
    where do i add the additional user?

    if i say "force user = YOUR_USERNAME NEW_USERNAME"
    then no one can logon.
    but if i configure it as follows:
    Code:
    force user = YOUR_USERNAME
    force group = YOUR_USERGROUP
    force user = NEW_USERNAME
    force group = NEW_USERGROUP
    where NEW_USERGROUP is the same as NEW_USERNAME.

    then i can log on with the YOUR_USERNAME, but no one else works.

    EDIT:
    yeah so, i reread it and figured out that new users don't have to be added to the samba.conf file. i have two users working now
    Last edited by dmizer; July 31st, 2006 at 07:46 AM.

  3. #63
    Join Date
    Dec 2005
    Location
    Vienna, Austria
    Beans
    155
    Distro
    Ubuntu

    Re: HOWTO: Setup Samba peer-to-peer with Windows

    Quote Originally Posted by dmizer View Post
    EDIT:
    yeah so, i reread it and figured out that new users don't have to be added to the samba.conf file. i have two users working now
    Hi!

    Just came across your post; sorry for the delay *gomen*

    Glad you figured it out ... as it's just a matter of adding and enabling the user(s) with smbpasswd.

    - Storm

    P.S.: As the "force user" and "force group" parameter seems to cause confusion here's a general hint for everyone ...

    The parameter refers to the user/group to whom the files inside the shared directories will belong; it has nothing to do with access rights/priviledges!

  4. #64
    Join Date
    Jun 2006
    Beans
    11

    Talking Re: HOWTO: Setup Samba peer-to-peer with Windows

    storm....you're the man!.....I 've just started using Ubuntu....you're howto is so easy to follow that I got file sharing working in the first pass!...cheers to you dude!

  5. #65
    Join Date
    Mar 2006
    Location
    Kitakyushu Japan
    Beans
    9,362
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: HOWTO: Setup Samba peer-to-peer with Windows

    Quote Originally Posted by Stormbringer View Post
    Hi!

    Just came across your post; sorry for the delay *gomen*

    Glad you figured it out ... as it's just a matter of adding and enabling the user(s) with smbpasswd.

    - Storm

    P.S.: As the "force user" and "force group" parameter seems to cause confusion here's a general hint for everyone ...

    The parameter refers to the user/group to whom the files inside the shared directories will belong; it has nothing to do with access rights/priviledges!
    tondemonai.

    it only took me about 20 minutes and a reread of your first post to figure it out on my own. and i actuall made good use of that "force user, force group" to resolve a problem with some sensitive "boss only" access files.

    you really are the man. vielen dank!

    edit:
    actually, i went back through and figured out why i tripped up on adding new users. it's in this line:

    In case you need other users to be able to access the share you need to add them to your system AND samba as well. Make sure you use the very same Windows usernames and passwords!
    so no problem adding them to my system, but when you say "AND samba" i assumed you meant samba.conf.
    Last edited by dmizer; July 31st, 2006 at 06:15 PM.

  6. #66
    Join Date
    Jun 2006
    Location
    Of der Ring - Austria
    Beans
    Hidden!
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: HOWTO: Setup Samba peer-to-peer with Windows

    Hi
    Thanks for this great howto!
    It worked out just fine.
    However I got a problem with the user permissions.
    I want my brother to access his folder and I want myself to access my own, but neither one of us should see the content of the others folders.

    The problem is that "force user" doesn't seem to work.
    Everyone can view all the folders. I tried messing around with chmod and chown, but it doesn't work out.
    I also set up the users on the linux machine and did everything according to the howto!

    I don't know what to do anymore. I really need user permissions, since there are files that some people should not see.

    Can someone help please?
    Flo

  7. #67
    Join Date
    Jun 2006
    Location
    Of der Ring - Austria
    Beans
    Hidden!
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: HOWTO: Setup Samba peer-to-peer with Windows

    Quote Originally Posted by Stormbringer;1319971
    The parameter refers to the user/group to whom the files inside the shared directories will belong; [b
    it has nothing to do with access rights/priviledges![/b]
    Sorry, I just read your post after posting my last one!
    I think I made that mistake as well.
    Can you tell me than how I set up access permissions, like in windows, that would be very important!
    Thanks in advance.
    Flo

  8. #68
    Join Date
    Dec 2005
    Location
    Vienna, Austria
    Beans
    155
    Distro
    Ubuntu

    Re: HOWTO: Setup Samba peer-to-peer with Windows

    Quote Originally Posted by Flavian View Post
    Hi
    Thanks for this great howto!
    It worked out just fine.
    However I got a problem with the user permissions.
    I want my brother to access his folder and I want myself to access my own, but neither one of us should see the content of the others folders.

    The problem is that "force user" doesn't seem to work.
    Everyone can view all the folders. I tried messing around with chmod and chown, but it doesn't work out.
    I also set up the users on the linux machine and did everything according to the howto!

    I don't know what to do anymore. I really need user permissions, since there are files that some people should not see.

    Can someone help please?
    Flo

    ----------------------------------------

    Sorry, I just read your post after posting my last one!
    I think I made that mistake as well.
    Can you tell me than how I set up access permissions, like in windows, that would be very important!
    Thanks in advance.
    Flo
    OK - let us start this way: could you please tell me what shares you configured (i.e. include the part in question into a reply)? Would make life easier as I won't have to guess.

    However, let's assume the following - maybe we get a direct hit:

    You and your brother have a user account on your Linux box and you want to access the HOME directories (/home/<username>)

    - Open smb.conf for editing
    Either type "sudo gedit /etc/samba/smb.conf" in a terminal or press ALT+F2 and input "gksudo gedit /etc/samba/smb.conf".

    - Find the following section:

    Code:
    ; NOTE: If you need access to the user home directories uncomment the
    ; lines below and adjust the settings to your hearts content.
    ;[homes]
        ;valid users = %S
        ;create mode = 0600
        ;directory mode = 0755
        ;browseable = no
        ;read only = no
        ;veto files = /*.{*}/.*/mail/bin/
    and change it to ...

    Code:
    ; NOTE: If you need access to the user home directories uncomment the
    ; lines below and adjust the settings to your hearts content.
    [homes]
        valid users = %S
        create mode = 0600
        directory mode = 0755
        browseable = no
        read only = no
        veto files = /*.{*}/.*/mail/bin/
    - Save the changes

    - Restart samba

    Type "sudo /etc/init.d/samba restart" in a terminal


    On Windows the shared home-directory (it's called by the username you have on your Linux box) should be automatically detected. If not, simply type \\<COMPUTERNAME>\<username> into the address bar of Windows Explorer - and if it doesn't work out by the name subsitute it with the ip address. Don't forget to input the correct credentials (username/password) when asked.


    If you are running a different configuration I rely on your feedback ...

    -Storm

  9. #69
    Join Date
    Jun 2006
    Location
    Of der Ring - Austria
    Beans
    Hidden!
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: HOWTO: Setup Samba peer-to-peer with Windows

    Hi Storm thanks for your quick reply!

    Here's the deal
    My Network at home includes 3 Pcs and a server.

    My brother: windows
    My Dad: Windows
    Me: Windows / Linux Hybrid

    Since I use linux most of the time I was planning on just setting up normal shares for everyone (like I had it before when I had my windows server running) so everyone has his own area where he can store stuff and no one else but him can access it.
    And than there is a global share called "Data" where I have stored all the programs, and installs (especially for windows) which me and my brother should have write permissions to, but my dead only read because he is very computer illiterate and I don't want him to mess up or delete files by accident.

    So it was when I had set up the windows server and so I was thinking to do it with linux.

    I have to say that I do not really understand the benefit of the /home directory thing.
    AND the home directory is also on the system partition of the linux server, which means that I would have to move it one of the bigger HDDs in the server. (I could not find how to do that, so I stuck to the idea mentioned above, by just creating single shares)

    I hope you could follow my description...

    Here's my smb.conf:

    [global]
    ; General server settings
    netbios name = SERVER
    server string =
    workgroup = WURM
    announce version = 5.0
    socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192

    passdb backend = tdbsam
    security = user
    null passwords = trues
    username map = /etc/samba/smbusers
    name resolve order = hosts wins bcast

    wins support = yes

    printing = CUPS
    printcap name = CUPS

    syslog = 1
    syslog only = yes

    ; NOTE: If you need access to the user home directories uncomment the
    ; lines below and adjust the settings to your hearts content.
    ;[homes]
    ;valid users = %S
    ;create mode = 0600
    ;directory mode = 0755
    ;browseable = no
    ;read only = no
    ;veto files = /*.{*}/.*/mail/bin/

    ; NOTE: Only needed if you run samba as a primary domain controller.
    ; Not needed as this config doesn't cover that matter.
    ;[netlogon]
    ;path = /var/lib/samba/netlogon
    ;admin users = Administrator
    ;valid users = %U
    ;read only = no

    ; NOTE: Again - only needed if you're running a primary domain controller.
    ;[Profiles]
    ;path = /var/lib/samba/profiles
    ;valid users = %U
    ;create mode = 0600
    ;directory mode = 0700
    ;writeable = yes
    ;browseable = no

    ; NOTE: Inside this place you may build a printer driver repository for
    ; Windows - I'll cover this topic in another HOWTO.
    [print$]
    path = /var/lib/samba/printers
    browseable = yes
    guest ok = yes
    read only = yes
    write list = root
    create mask = 0664
    directory mask = 0775

    [printers]
    path = /tmp
    printable = yes
    guest ok = yes
    browseable = no

    ; Uncomment if you need to share your CD-/DVD-ROM Drive
    ;[DVD-ROM Drive]
    ;path = /media/cdrom
    ;browseable = yes
    ;read only = yes
    ;guest ok = yes


    ############ Fileshares begin here #############

    [Data]
    path = /media/hdb1
    browseable = yes
    read only = no
    guest ok = no
    create mask = 0644
    directory mask = 0750

    [Florian]
    path = /media/hdc1/Florian
    browseable = yes
    read only = no
    guest ok = no
    create mask = 0644
    directory mask = 0750
    force user = florian
    force group = florian

    [Lukas]
    path = /media/hdc1/Lukas
    browseable = yes
    read only = no
    guest ok = no
    create mask = 0644
    directory mask = 0750
    force user = lukas
    force group = lukas

    [Hans-Jörg]
    path = /media/hdc1/Hans-Jörg
    browseable = yes
    read only = no
    guest ok = no
    create mask = 0644
    directory mask = 0750
    force user = hans-jörg
    force group = hans-joerg
    Thanks for your nice help
    Flo

  10. #70
    Join Date
    Dec 2005
    Location
    Vienna, Austria
    Beans
    155
    Distro
    Ubuntu

    Re: HOWTO: Setup Samba peer-to-peer with Windows

    Quote Originally Posted by Flavian View Post
    Here's my smb.conf:

    null passwords = trues
    TYPING MISTAKE ENCOUNTERED!!!!
    Please correct it to read "true"

    Quote Originally Posted by Flavian View Post
    [Data]
    path = /media/hdb1
    browseable = yes
    read only = no
    guest ok = no
    create mask = 0644
    directory mask = 0750
    Although you want ALL of your family to have access here you should set "force user" and "force group" to the user account with whom you usually work on your Ubuntu box - I assume it's yours ...

    Please add...

    force user = florian
    force group = florian

    As I already stated in the thread: the "force user" and "force group" parameter has nothing to do with access priviledges but with the permissions of the local linux filesystem. All authenticated users will have access here.

    EDIT
    Short explaination:
    Setting a forced user/group will make sure that all files and folders will belong to the user that is working on the box - so you won't have any troubles accessing the files/folders from within Ubuntu.

    To figure out the difference...

    Do a

    ls -lisa /media/hdb1/

    and

    ls -lisa /media/hdc1/Lukas
    or
    ls -lisa /media/hdc1/hans-joerg

    The difference in the file permissions should be easily spotted.
    /EDIT
    Quote Originally Posted by Flavian View Post
    [Florian]
    path = /media/hdc1/Florian
    browseable = yes
    read only = no
    guest ok = no
    create mask = 0644
    directory mask = 0750
    force user = florian
    force group = florian
    To lock this share so that ONLY YOU will have access add the following line...

    valid users = florian


    Quote Originally Posted by Flavian View Post
    [Lukas]
    path = /media/hdc1/Lukas
    browseable = yes
    read only = no
    guest ok = no
    create mask = 0644
    directory mask = 0750
    force user = lukas
    force group = lukas
    Same here ... if ONLY lukas should have access add ...

    valid users = lukas


    Quote Originally Posted by Flavian View Post
    [Hans-Jörg]
    path = /media/hdc1/Hans-Jörg
    browseable = yes
    read only = no
    guest ok = no
    create mask = 0644
    directory mask = 0750
    force user = hans-jörg
    force group = hans-joerg
    Please refrain from using german umlauts - stick to plain ASCII (although Dapper supports UTF-8 without any hitches, at least for me, you better not try to trigger problems lurking in the dark corners). German Umlauts in the share declaration and/or path in the local filesystem may cause major issues. This, however, does not apply to the files you store on the share ... as long as >Windows< happily recognizes the correct characters you are fine.

    Therefore, better delete the user account (from your system and with smbpasswd from samba) and make it up anew by writing is as "hans-joerg".

    As soon as it's done add ...

    valid users = hans-joerg

    ...to lock down the share for this user ONLY.


    After you made the changes you need to restart samba (reloading doesn't always work out) --- sudo /etc/init.d/samba restart.

    -Storm
    Last edited by Stormbringer; August 1st, 2006 at 01:29 PM.

Page 7 of 106 FirstFirst ... 567891757 ... LastLast

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
  •