LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Samba problems (versions 3.6.6, 3.6.8) (https://www.linuxquestions.org/questions/linux-software-2/samba-problems-versions-3-6-6-3-6-8-a-4175448289/)

dchmelik 02-02-2013 12:58 AM

Samba problems (versions 3.6.6, 3.6.8)
 
I started a thread when I had problems with Slackware's Samba, including Slackware 14's Samba 3.6.8. Now I also have problems with OpenBSD's 5.2's Samba 3.6.6. This is mostly a Windows XP question, but it involves Samba bugs (as it is designed to work with Windows, but is not working for me :) in fact I found one specific bug, described at the bottom, though I do not know how serious it is.

These Samba versions on these operating systems (OSes) work fine with each other, and Windows XP is still able to share its own folders with computers that have these two POSIX-type OSes. I have full privileges on all these systems.

I mentioned in my Slackware Samba thread that I had got Samba working with OpenBSD. Then, I got it working with Slackware. However, one day, Windows XP was suddenly no longer able to access the stuff shared with Samba on Slackware. A few days later, Windows XP was suddenly no longer able to access the stuff shared with Samba on OpenBSD. I will post my smb.conf from each machine. They were basically the same when they started working one after another (and I may have entered a certain username or password, though I should not have had to, because they are set to guest-only access ;) they were the same when they stopped working; today I added a printer in Samba on OpenBSD, which is the only difference--and of course, I could not access this printer from Windows XP yet.

I do not recall how I gained access on Windows XP, and I do not think it was as automatic or clear as described, but I will describe how I lost access. I decided to change the shared folder on OpenBSD, so I deleted the instance of the shared folder on Windows, updated smb.conf, and never regained access by either refreshing the network location list or entering the network path manually, though I can access OpenBSD Samba shares on Slackware. The other time, I was editing in notepad and tried to save directly to the shared folder on Slackware (which I had copied back and forth to regularly on the LAN,) and then my access was immediately cut off and could never be regained in the normal sorts of ways.

I installed a so-called 'fix' from microsoft.com, which did nothing.

my smb.conf on Slackware 14
Code:

# Samba config file created using SWAT
# from UNKNOWN (127.0.0.1)
# Date: 2013/01/18 21:32:13

[global]
        workgroup = MSHOME
        server string = Samba Server
        log file = /var/log/samba.%m
        max log size = 50
        dns proxy = No
        idmap config * : backend = tdb
        hosts allow = 192.168.1., 192.168.2., 127.

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

[u]
        path = /home/u
        read only = No
        guest ok = Yes
        guest only = Yes

In the following file, I am only trying to access /home/u/share from Windows.

my smb.conf on OpenBSD 5.2
Code:

# Samba config file created using SWAT
# from UNKNOWN (127.0.0.1)
# Date: 2013/02/01 22:19:59

[global]
    workgroup = MSHOME
    server string = Samba Server
    log file = /var/log/samba/smbd.%m
    max log size = 50
    dns proxy = No
    idmap config * : backend = tdb
    hosts allow = 192.168.1., 192.168.2., 127.

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

[www]
    path = /var/www
    valid users = d
    read only = No

[d]
    path = /var/www/users/d
    read only = No

[share]
    path = /home/u/share
    read only = No
    guest only = Yes
    guest ok = Yes

[InkJet]
    comment = hp_photosmart_7350
    path = /var/spool/samba
    read only = No
    guest ok = Yes
    printable = Yes
    print ok = Yes
    printer name = InkJet
    oplocks = No
    share modes = No

I also set printers 'browseable' above, but SWAT would not do it and would not recognize that I had modified that in smb.conf, even after restarting all Samba daemons and reloading the 'view' page.

After access suddenly stopped working, I think I still tried everything I had tried the first time.

Ztcoracat 02-02-2013 01:46 AM

Hi: dchmelik:

Until today I didn't know that SWAT edits the sm.conf file but also strips out any comments you may have manually made. Troubleshooting SWAT is about 1/2 down the page-
Troubleshooting Secure SWAT
http://www.linuxhomenetworking.com/w...a#.UQzD5N1_Z8c
http://www.linuxquestions.org/linux/..._for_SuSE_10_2


Only other thing I can think of and you probably already have; but ensure that you have the latest binary version of SWAT for your distro and if you made changes to the configuration parameters double check that they are ok.

This is not my area of expertise-

Hope this helps-

dchmelik 02-02-2013 02:02 AM

As I said, the parameters are ok, because I can access the shared Samaba folders that are on the Slackware and OpenBSD systems from each other; it just stopped working to access them from Windows (without changing anything, in the situations described above.) I do not care about the minor SWAT printers bug I found right now, because I cannot access anything on the file & print server from Windows, let alone print from it (and actually, the CUPS print bug you found in my CUPS thread seems to be for other versions of CUPS, not OpenBSD's, so I still could not print from the print server.)

Honestly, I do not really know how I should be logging in from Windows. According to what I read, when Samba is set to guest-only, that means unless you login with an account that is on the machine you want to access, it changes your login to 'nobody' and logs you into the guest area. I accessed that area in the past, but I am not sure how. This time I tried logging in with no account name and no password. I tried logging in with user 'nobody' (which changed to the style 'WINDOWSHOSTNAME\nobody') and no password. I tried logging in with the style 'POSIXHOSTNAME\nobody' for each POSIX-type host's actual hostname in that style. I tried logging in with a username that exists on both the Windows (with no password) and POSIX-type hosts, with the password that is on the POSIX-type hosts (one has no password, but I do not use that account to login to it, and guest access had worked and should again) many times. I regularly use the password in ssh, so I know I entered it right at least most of the time. Windows is just not letting me login to Samba shares on the POSIX-type OSes. I admit I never read how to do this in Windows, but it seems easy enough and should be working; I think one of the ways I am doing it has to be right, but it is because of what I did that made me lose access. I do not know if this is a bug of Windows and the Microsoft 'fix' that did not work, or if it is a bug of the Samba software in the case of working with Windows.

Ztcoracat 02-03-2013 04:36 PM

This is way out of my realm-

I'd have to learn more about Samba and the utility tools used to make things work efficiently-

We have a few members here that are good with DNS Settings and working with servers and Samba issues's.
Their names are failing me at the moment; sorry-

Quote:

I do not know if this is a bug of Windows and the Microsoft 'fix' that did not work, or if it is a bug of the Samba software in the case of working with Windows.
Not sure but there has to be a way to tell what is going on-


I'll see what I can articulate about this issue you are having.

Ztcoracat 02-03-2013 04:51 PM

I found a few things on Windows and Samba shares I hope these article's are of some use to you-

I wonder if the problem is that the Windows computer can't see the linux server or samba folder but I was only able to establish that idea from what the member mentions in his Fedora post; see the last link.

http://ubuntuforums.org/showthread.php?t=202605
http://www.samba.org/
http://www.hackorama.com/network/samba.shtml
http://wiki.samba.org/index.php/Windows7
http://forums.fedoraforum.org/showthread.php?t=271732

[Solved] Windows 7 and Samba Issue"
http://www.tomshardware.com/forum/75...ws-samba-issue
http://www.samba.org/samba/docs/man/...mb.conf.5.html
http://www.linuxtopia.org/online_boo...ntrols_25.html

I'm learning as I help you so bear with me as I am not on a server and don't know all the details-

dchmelik 07-16-2015 12:43 AM

I have stopped using Samba for now and maybe some of this is solved, or documented such as in some of the links in replies, so I am marking this solved. I had planned joining the Samba mailing list group (email) to ask questions there but will not need to know, but I would suggest it if anyone still has similar problems.


All times are GMT -5. The time now is 10:53 AM.