What's wrong with my smb.conf and why can't Windows access the share?

9,225

That's really quite interesting. I'm using a lot of the same configuration options for my Samba34.

That being said, hit up man 5 smb.conf - this will list all the acceptable clauses you can use. Don't forget, also, to make sure each thing is in the correct section. For example, don't have server string = UBUNTU under [Myshare]. By convention, each section should start with a lower case letter. I'd expect Samba to be a little bit more robust, but perhaps it isn't being recognised as a share?

Also, I don't believe read_only and guest_ok are valid entries. The rest of them are valid, so they're most likely not being recognised as applying to any share; they're sitting loose and are hence being ignored.

Start with a light configuration and slowly work your way up. Comment out lines with # and add them back until you find out what's doing it. I don't think [Myshare] is the bit with the issues; I think you've used [global]-only fields under different shares or something like that. The man page should explain where each can be used.

Share:
9,225

Related videos on Youtube

tony_sid
Author by

tony_sid

Born and raised in California. Computers are my main hobby.

Updated on September 17, 2022

Comments

  • tony_sid
    tony_sid over 1 year

    I'm trying to use Samba to share files between Windows XP and Ubuntu.

    I edited the smb.conf and added the workgroup name and netbios name. This is the part that has problems:

    [Myshare]
        comment = Myshare
        path = /myshare
        read only = no
        guest ok = yes
    

    When I do sudo samba restart I get the following output:

    Unknown parameter encountered: "max log size"
    Ignoring unknown parameter "max log size"
    Unknown parameter encountered: "syslog"
    Ignoring unknown parameter "syslog"
    Unknown parameter encountered: "passdb backend"
    Ignoring unknown parameter "passdb backend"
    Unknown parameter encountered: "unix password sync"
    Ignoring unknown parameter "unix password sync"
    Unknown parameter encountered: "passwd program"
    Ignoring unknown parameter "passwd program"
    Unknown parameter encountered: "pam password change"
    Ignoring unknown parameter "pam password change"
    Unknown parameter encountered: "map to guest"
    Ignoring unknown parameter "map to guest"
    Unknown parameter encountered: "usershare allow guests"
    Ignoring unknown parameter "usershare allow guests"
    Unknown parameter encountered: "read_only"
    Ignoring unknown parameter "read_only"
    Unknown parameter encountered: "guest_ok"
    Ignoring unknown parameter "guest_ok"
    Unknown parameter encountered: "guest ok"
    Ignoring unknown parameter "guest ok"
    Unknown parameter encountered: "guest ok"
    Ignoring unknown parameter "guest ok"
    

    From my Windows XP machine, I can see the share, but when I try to access it, it says it's not available and I might not have permission to use it. I already changed the permissions of the directory.

    When I installed samba, I did sudo apt-get install samba4 I think these problems might be because I'm using a newer version of samba and it doesn't recognize the old syntax from the smb.conf file.

    When I try to run smbpasswd it says cli_pipe_validate_current_pdu: RPC fault code DCERPC_FAULT_OP_RNG_ERROR received from host 127.0.0.1! machine 127.0.0.1 rejected the password change: Error was : NT code 0x1c010002.

  • Ramhound
    Ramhound over 3 years
    You should provide explicit instructions on how you solve the problem. As currently written this probably should have just been submitted as a comment.