Samba server woes

Discussion in 'Server Operation' started by Cobrag0318, May 29, 2014.

  1. Cobrag0318

    Cobrag0318 New Member

    Ok. I recently updated to a newer computer, and a newer version of Fedora. From Fedora Core 3, to fedora 18. FYI, the client computers are running windows 7.

    Needless to say I can't just copy my configuration files over and get Samba, as well as the other servers, to run properly. I've tried just about every example smb.conf file there is to start with. At best, I can get the samba server to show up in the network window, but when I click to open it up to view the shares, it says it can't find the server. I've tried manually typing in the address bar. \\server or \\ And even using \\\shares. (Had a temporary share called shares for testing) Nada.

    So I figure what I'll do is post my old smb.conf from Fedora Core 3 in here since it reflects how I eventually want it set up, and maybe someone can tell me how to apply the settings to the new version of samba. When it was running Fedora Core 3, windows 7 had no problem not only seeing it, but showing the shared folders, and allowing proper access. Also, what else might be allowing the server to show, but blocking the shares. I have temporarily disable selinux and added the proper ports to iptables. So those shouldn't be the problem.

    Attached Files:

  2. srijan

    srijan New Member HowtoForge Supporter

    Please paste the output of
  3. Cobrag0318

    Cobrag0318 New Member

    Had to go back and redo the smb.conf file. I killed the one I was working with, this one won't even show up on the windows network at all, and I think I got the settings the same as before. But anyway, here's the testparm dump.

  4. srijan

    srijan New Member HowtoForge Supporter

    You can refer the guide for configuring your smb.conf file
  5. Cobrag0318

    Cobrag0318 New Member

    Will check it out. Hopefully it will be more helpful than other how-to and examples. There's so many how-tos out there, I've tried 6 or 7, not including specific searches for the specific issues and none have helped. I'll be very happy if this works better.
  6. Cobrag0318

    Cobrag0318 New Member

    Didn't even make it past the first page. Set it up, as per the how-to, windows doesn't even see it. So not even gotten to making secure folders and whatnot. Granted, I'm using Fedora and not Ubuntu. But the only major difference for this purpose I can see is the usage of smb.cnf for Ubuntu, which I know translates to smb.conf for fedora. The only change I made to the example file was to change the workgroup to doom. I don't care if the server wants to call itself Ubuntu right now, that's just what it'll tell windows to call it and I know it won't affect samba running. I'll change names and add share as I like once I get a working server. Even without, I should still be able to access it from "run" box using it's IP, and got nothing. Windows can't find it. I'm going to try a clean reinstall of fedora and try it again. Should that fail, I may have to switch distros, maybe to Ubuntu, and see where that goes.

    It's strange that the version of samba that came with Fedora 3 had no problems (even being seen by windows 7, which from what I've read has caused no end of problems to people), but the one with Fedora 18 does. I'm sure samba must've gotten a couple of overhauls since FC3 then but I'd hope that making a simple file server would work similarly, even in F18.
  7. Cobrag0318

    Cobrag0318 New Member

    Ok. So far, no luck with the how-to using Fedora. So I figure, since the how-to example is ubuntu, I'll try at go using ubuntu. It'll be an adjustment since I've dealt almost exclusively with red hat/fedora. The system has a CD drive not a DVD drive. I do protest ubuntu's documentation using those interchangeably. LoL But I did find a "minimal" install image thatll allow me to start from CD and install from online. Even if it's ugly old ANSI interface. I will try it with that and let you know how it goes. I'll just have to decide between the different spins/forks. Kubuntu, xubuntu, lubuntu, etc. It is an older system so something light may be best, like X or L.
  8. srijan

    srijan New Member HowtoForge Supporter

    You can use any of the OS ie fedora or ubuntu for samba server. I have given you the latest ubuntu server klink with samba, even if you want to check in fedora then it would be like this

    & the smb.conf will be same as mentioned in the ubuntu link given above.
  9. srijan

    srijan New Member HowtoForge Supporter

    additionally here the services are only different
  10. Cobrag0318

    Cobrag0318 New Member

    Well, it works in ubuntu, so I'm suspecting it's a Fedora issue. I've already created a share to my /etc/samba folder that I can access securely. So now I don't have to fumble around editing it on a screen I can barely see.

    Also of note, I learned that ubuntu, at least the current version, has issue when trying to invoke "service smbd restart", or other similar commands, using su. Gives you an "unknown job" error. However, it works perfectly fine prefixing the command with sudo instead. I'd though for a brief moment that ubuntu's samba was fouling up as well, till I googled the error and discovered that. If I'm not mistaken, I think it's considered more proper to sudo every administrative command rather than being a slacker like me and simply doing a su.

    So now, through samba, through logging in with a secure account, I can view and edit my smb.conf remotely, my ftp config file and ftp shares, and my apache config and hosted folder. Now I just need to setup mail services and populate my shares and my new server is ready for service. Of course, I can kill the gui at that point, since it'll be running sans monitor anyways. May also set up remote terminal access, but maybe not. I still like the security of no one having command line access unless they're physically at the box.
  11. srijan

    srijan New Member HowtoForge Supporter

    I have checked samba in CentOS, ubuntu, opensuse & debian. Its working fine in all distributions. May be there would be some error in samba configuration file. You can use any distribution for that.

    After changing into root there is no need to use sudo, as root itself is root & not as root. So I will advice to use "service smbd restart"
  12. Cobrag0318

    Cobrag0318 New Member

    Hmm, maybe. But I tried going by the how-to here, as well as countless others, and example smb.conf files for simple setups and nothing worked in Fedora 18. I could get it to show in Network Neighborhood, or network places, or whatever you want to call it, but couldn't get the shares to show. Always got there error saying it couldn't find it. Install Ubuntu instead, and had it working in like 10 mins, using the very same steps from the how-to linked earlier. So all same steps tried with fedora and ubuntu, fedora refused to work, ubuntu worked in 10 mins. Difference, the distro. Why? Dunno. But I'm happy ubuntu works then.

    I wasn't doing sudo after using su. I initially used su, then tried "service smbd restart" and got the unknown job error under su. Googled my troubles, and found that ubuntu doesn't like running that command under su. The workaround is to "exit" out of su, and instead invoke it using "sudo service smbd restart". Which theoretically should be the same, just doesn't leave you logged in as super user like su does. However, there is apparently a difference there other than that. I am not logged in as "root", though my name logs me in with administrator privileges as part as the administrators group. So some functions still require me to su or sudo.

    So samba problems, solved. been trying to get vsftpd working. Can see shares, set up jailing the users to their home folders. Everything fine there. Write privileges are eluding despite giving "ftp" write privileges, as well as enabling in the conf file. But I've spent 5 mins on that so far, so I'm sure it's just something minor I'm missing. Oh how I miss Windows' permissions tab/dialogues. I'm sure there's an easy gui frontend for that in ubuntu as well. I'm still like that person that just moved in to a new place, and still digging through all of the boxes trying to figure out where I put things. LoL
  13. sjau

    sjau Local Meanie Moderator

    Here's my very simple smb.conf

       workgroup = ARBEITSGRUPPE
       server string = %h server
    #   wins support = no
    ;   wins server = w.x.y.z
       dns proxy = no
    ;   name resolve order = lmhosts host wins bcast
    ;   interfaces = eth0
    ;   bind interfaces only = yes
    #   read size = 1024
       hosts allow =,,
       hosts deny =
       log file = /var/log/samba/log.%m
       max log size = 1000
    #   syslog only = no
       syslog = 0
       panic action = /usr/share/samba/panic-action %d
       security = user
       encrypt passwords = true
       map to guest = bad user
       guest account = sjau
    #======================= Share Definitions =======================
            comment = Scanner Share
            path = /data/samba/Scanner
            read only = no
            guest only = yes
            guest ok = yes
            hosts allow =,,
            comment = WJDB Share
            path = /data/samba/WJDB
            read only = no
            guest only = yes
            guest ok = yes
            hosts allow =,
            comment = Docs Share
            path = /data/samba
            read only = no
            guest only = yes
            guest ok = yes
            hosts allow =,

    regarding socket options: test a bit what works for you the best. I noticed some options make better performance.

    furthermore, I'm not too worried about security. I only allow two private networks: 10.10.10.x and 10.10.11.x

    The 10.10.10.x is my actual lan. For that I have one share that everybody can access as guest. That's just to make my life simpler to scan documents to the samba server. I have a nice little brother document scanner.

    The 10.10.11.x is actually a vpn. So only clients with vpn certificates can access that. So the two important shares can only be accessed through the vpn.

    You also notice that the "Docs" share is just /data/samba whilte the other two are /data/samba/xxx I made that on purpose so that with the Docs share I can access everything that I need but still have a direct access to Scanner and WJDB as additional shares.

    On Windows you can access it easily. In Explorer click on your "Computer" and then you should get an option in the toolbar to add a network drive. Click that and in the search box then enter: \\HOSTNAME or \\IP and click on browse. Then the server and shares should pop up.
    Last edited: Jun 6, 2014

Share This Page