Results 1 to 7 of 7

Thread: Sharing root (/) via SAMBA

  1. #1

    Unhappy Sharing root (/) via SAMBA

    Trying to share the root directory as "root" via SAMBA. This worked in OpenSUSE 12 and 13, but after upgrading to LEAP 15.0 and mounting the share on a Windows 10 machine (everybody is in WORKGROUP), the mount itself appears to work but "there is no there there" - I get permission errors trying to access, list or anything else.

    The active parts of my smb.conf are:

    [users]
    comment = All users
    path = /home
    read only = No
    inherit acls = Yes
    veto files = /aquota.user/groups/shares/
    guest ok = Yes

    [root]
    comment = root
    force group = root
    force user = root
    guest ok = Yes
    path = /
    read only = No
    inherit acls = No


    I can set up and share the /home directory as "users" as shown above, mount it on Windows 10, and it works a treat. What's special about the root directory, and how can I overcome it? (No worries about security, this is all internal to my home network which is double-firewalled from the outside world. Nobody but friends in here...)

  2. #2

    Angry Re: Sharing root (/) via SAMBA

    Worse, restarting smb now shows the root share, but when selecting it in Windows 10 (part of Mount a Drive) it says I don't have the rights to access the share - even before I specify a user/password from either Windows 10 or Linux.

    Exactly the same setup works perfectly in OpenSUSE 12 and 13.

    How do I unlock "/" in smb in OpenSUSE LEAP 15?

  3. #3
    Join Date
    Jun 2008
    Location
    Rural Australia
    Posts
    286

    Default Re: Sharing root (/) via SAMBA

    The various help documents for Leap 15 are here: https://doc.opensuse.org/

    Self finds it easier searching PDF's
    example download and read book.opensuse.reference_color_en.pdf eg 21 Samba.




    .

  4. #4
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,400

    Talking Re: Sharing root (/) via SAMBA

    Quote Originally Posted by jackrlewis View Post
    What's special about the root directory, and how can I overcome it?
    The “force user” or “force group” parameters in your smb.conf need to be in a [root$] section …

    The following will allow read-only access from a Redmond box but, “other” permissions in the system directories will prevent the Redmond OS from being able to read everything:
    Code:
    [root$]
    path = /
    create mask = 0755
    valid user = myname
    browsable = yes
    It's also possible that an openSUSE Policy rule will prevent the SMB access to “/” …

  5. #5

    Thumbs up Re: Sharing root (/) via SAMBA

    Kudos to dcurtisfra! Based on his reply, here's what I came up with:

    1. ln -s / /slash

    2. add the following to /etc/samba/smb.conf:

    [slash]
    comment = root
    force group = root
    force user = root
    guest ok = Yes
    hosts allow = 192.168.0.0/24
    inherit acls = Yes
    path = /slash
    read only = No
    admin users = root
    available = Yes
    browseable = Yes
    create mask = 0777
    directory mask = 0777
    locking = Yes
    printable = No
    public = Yes
    strict locking = No
    valid users = root
    writeable = Yes
    write list = root

    Yeah, some of that may not be necessary, but...

    3. systemctl stop smb.service

    4. systemctl start smb.service

    5. On my Windows 10 box, a simple Computer / Mount Network Drive specifying "\\<OpenSUSE machine name>\slash", entering root's password when prompted, and we're done.

    Warning: Make sure your security is adequate (in my case, an internal network most heavily firewalled from the outside world - never been penetrated, hacked, breached, whatever in more than two decades), because this is a wide-open share. Your security settings may (and probably should) vary...

    Color this thread closed.

  6. #6
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    19,583
    Blog Entries
    14

    Default Re: Sharing root (/) via SAMBA

    This is outright dangerous. Just saying.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    https://en.opensuse.org/openSUSE:Board#Members
    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  7. #7
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    2,400

    Cool Re: Sharing root (/) via SAMBA

    Quote Originally Posted by Knurpht View Post
    This is outright dangerous. Just saying.
    Totally, 100 %, agree !!! …

    But, even if I can't imagine why and, even if I totally disagree with the facility provided by the Samba folks, the fact remains that, the Samba community provides the capability and, this post's originator needs to use the capability, for what ever reason …

    Yes, yes, yes: within the current World we're living in, every Server system, with, AFAICS, no exceptions, regardless of the Network Protocol being used, is condemned to export only that application data, and no more than that, which needs to be distributed within the network the concerned Server system is serving …

    And, here endeth the Sermon

Posting Permissions

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