Results 1 to 10 of 14

Thread: Samba, public and private shares

Hybrid View

  1. #1
    Join Date
    Jan 2013
    Beans
    6

    Samba, public and private shares

    Is there any way to set up public shares and private shares? I have my public shares setup and working so that anyone can read and write without needing a password. I would like to set up a share that requires a username and password to read and write to. I'm using Ubuntu 12.04

  2. #2
    Join Date
    Jul 2008
    Location
    Vermont, USA
    Beans
    61
    Distro
    Ubuntu 12.10 Quantal Quetzal

    Re: help with samba


  3. #3
    Join Date
    Dec 2009
    Beans
    5,662

    Re: help with samba

    You didn't state what method you are using to create the samba shares - there are 2: One is created in Nautilus and the other is in smb.conf itself.

    I'm guessing that had you used Nautilus it would be obvious since you would have checked only 2 of the 3 boxes to make a private share ( see attachment ).

    To create a private share in smb.conf in it's simplest form:
    [share-name]
    path = /path/to/folder
    guest ok = no
    read only = no
    Note: There are an infinite number of variations of that type of share definition depending on how you want to control who can do what.

    In either method you will need to create a user on your Linux box representing each LAN user and then you have to add them to the samba password database. So if you have a remote user named morbius:

    ** Create a user morbius on your Linux box.
    ** Add him to the samba database using this command:
    Code:
    sudo smbpasswd -a morbius
    Attached Images Attached Images

  4. #4
    Join Date
    Jan 2013
    Beans
    6

    Re: help with samba

    Thanks for the replies.

    I used the smb.conf method to create the shares.

    Morbius1
    Your suggestion did give me the password prompt that I was wanting, but I didn't have the permission to write to it, also once I entered my username and password I lost the permission to write to my public share.

    thanks.

  5. #5
    Join Date
    Dec 2009
    Beans
    5,662

    Re: Samba, public and private shares

    Please post the output of the following command:
    Code:
    testparm -s

  6. #6
    Join Date
    Jan 2013
    Beans
    6

    Re: Samba, public and private shares

    Load smb config files from /etc/samba/smb.conf
    rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
    Processing section "[printers]"
    Processing section "[print$]"
    Processing section "[share]"
    Processing section "[backup]"
    Processing section "[PRIVATE]"
    Loaded services file OK.
    Server role: ROLE_STANDALONE
    [global]
    workgroup = ALB_GROUP
    server string = %h server (Samba, Ubuntu)
    map to guest = Bad User
    obey pam restrictions = Yes
    pam password change = Yes
    passwd program = /usr/bin/passwd %u
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    unix password sync = Yes
    syslog = 0
    log file = /var/log/samba/log.%m
    max log size = 1000
    dns proxy = No
    usershare allow guests = Yes
    panic action = /usr/share/samba/panic-action %d
    idmap config * : backend = tdb

    [printers]
    comment = All Printers
    path = /var/spool/samba
    create mask = 0700
    printable = Yes
    print ok = Yes
    browseable = No

    [print$]
    comment = Printer Drivers
    path = /var/lib/samba/printers

    [share]
    comment = backup share
    path = /srv/samba/share
    read only = No
    create mask = 0755
    guest ok = Yes

    [backup]
    comment = backup dir
    path = /home/misty/backup
    read only = No
    create mask = 0755
    guest ok = Yes

    [PRIVATE]
    path = /srv/samba/private
    read only = No

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

    Re: Samba, public and private shares

    And the output of this one please:
    Code:
    ls -al /srv/samba

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
  •