LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   samba and Win7 (https://www.linuxquestions.org/questions/linux-networking-3/samba-and-win7-4175425039/)

elarsen 08-31-2012 05:17 PM

samba and Win7
 
I am having the worst luck having my win7 connect to samba. I have tried numerous things found on the internet. The closest thing that I have done was having my win7 see that their is a samba share available, but that is intermittently. I am using samba v. 3.4.14 and Ubuntu 10.04. According to testparm my config is good.

I have changed the lan manager auth level, and minimum session security. Edited the registry changed config file for samba. Nothing seams to work for me.

casualfred 08-31-2012 06:18 PM

I managed to get samba shares working with Windows using the SWAT samba configuration utility. For Ubuntu, this page describes how to install SWAT. SWAT is just a smb.conf configurator that you run through a web browser (it doesn't go on the internet, but just uses the browser interface).

In doing a test install myself on Ubuntu following those directions, I had to also reboot the machine after adding /etc/xinetd.d/swat and change the permissions of /etc/samba/smb.conf as described there.

As a side note, when using SWAT to make shares, be sure not to forget to mark the share as "Active". Oh another note - SWAT remakes your smb.conf, so you might want to make a backup if you put a lot of work into it. Sometimes it can take up to five minutes before a share will show up in Windows I have found. Also, the Windows computer should be in the same Workgroup, but you probably already knew that.

Hope that helps, but there's probably an easier way..

Ser Olmy 08-31-2012 06:23 PM

You are using an old version of samba. 3.4.14 was released in July 2011, and the latest update to the 3.4.x series was a security release (3.4.17) in April 2012. The 3.4.x and 3.5.x series are in maintenance, and the current stable version is 3.6.7.

While I can't say with any degree of certainty what's causing your problems (too few details), I can say that the samba developers have resolved a lot of protocol-related bugs over the last year or so. You may want to upgrade to a more recent version.

Does anything appear in the samba logs when you try to access a share? Are you running nmbd? Are you running a local DNS server? Could you post the contents of smb.conf?

suicidaleggroll 08-31-2012 08:52 PM

Post your smb.conf and make sure your Win7 box is in the right workgroup

Getting SAMBA working correctly on my server was a royal PITA, but once I got it working it's been completely stable since (about 18 months ago). It's worth the effort to get it going, but it did take about 2 days of googling and testing before I finally got mine running correctly. I dread the day when my server OS goes EOL and I need to upgrade and get SAMBA working again, lol.

frankbell 08-31-2012 09:49 PM

My samba connects flawlessly to Win7 from both my Debian Squeeze and my Slackware --Current machines.

Consequently, I can't help you diagnose the problem, but I can assure you it can work.

I do know this--if you are trying to share a Windows 7 directory using the Windows "homegroup" settings, that will not work. "Homegroup" works only with other Windows boxes. You have to do your Windows sharing without "Homegroup."

http://lifehacker.com/5883517/how-to...s-in-your-home

elarsen 08-31-2012 10:16 PM

I have no homegroup running in windows. I am running nmbd and smbd. My log file says

[2012/08/31 21:45:37, 0] nmbd/nmbd_browsesync.c:350(find_domain_master_name_query_fail)
find_domain_master_name_query_fail:
Unable to find the Domain Master Browser name FACTORY 33<1b> for the workgroup FACTORY 33.
Unable to sync browse lists in this workgroup.

Before I ran swat
Code:

[global]
        workgroup = factory 33
        server string = Samba Server V %v
        dns proxy = no
        log file = /var/log/samba/log.%m
        max log size = 1000
        syslog = 0
        panic action = /usr/share/samba/panic-action %d
        obey pam restrictions = yes
        unix password sync = yes
        passwd program = /usr/bin/passwd %u
        passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
        pam password change = yes
        map to guest = bad user
        usershare owner only = false
        usershare allow guests = yes
        username map = /etc/samba/smbusers
        security = user
        directory mask = 0700
        valid users = %S
        encrypt passwords = no
;        guest ok = no
;        guest account = nobody
        client ntlmv2 auth = yes
        wins support = yes
        wins proxy = no
        lanman auth = yes
        ntlm auth = yes
name resolve order = bcast host lmhosts wins

[printers]
        comment = All Printers
        browseable = no
        path = /var/spool/samba
        printable = yes
;        guest ok = no
;        read only = yes
        create mask = 0700
# Windows clients look for this share name as a source of downloadable
# printer drivers

[print$]
        comment = Printer Drivers
        path = /var/lib/samba/printers
;        browseable = yes
;        read only = yes
;        guest ok = no
# Uncomment to allow remote administration of Windows print drivers.
# You may need to replace 'lpadmin' with the name of the group your
# admin users are members of.
# Please note that you also need to set appropriate Unix permissions
# to the drivers directory for these users to have write rights in it
;  write list = root, @lpadmin
# A sample share for sharing your CD-ROM with others.

;[cdrom]
;  comment = Samba server's CD-ROM
;  read only = yes
;  locking = no
;  path = /cdrom
;  guest ok = yes
# The next two parameters show how to auto-mount a CD-ROM when the
#        cdrom share is accesed. For this to work /etc/fstab must contain
#        an entry like this:
#
#      /dev/scd0  /cdrom  iso9660 defaults,noauto,ro,user  0 0
#
# The CD-ROM gets unmounted automatically after the connection to the
#
# If you don't want to use auto-mounting/unmounting make sure the CD
#        is mounted on /cdrom
#
;  preexec = /bin/mount /cdrom
;  postexec = /bin/umount /cdrom

[storage]
        path = /storage
        writeable = yes
;        browseable = yes
        valid users = earl

After I ran Swat
Code:

[global]
        workgroup = FACTORY 33
        server string = Samba Server V %v
        encrypt passwords = No
        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* .
        username map = /etc/samba/smbusers
        unix password sync = Yes
        lanman auth = Yes
        client NTLMv2 auth = Yes
        syslog = 0
        log file = /var/log/samba/log.%m
        max log size = 1000
        name resolve order = bcast host lmhosts wins
        dns proxy = No
        wins support = Yes
        usershare allow guests = Yes
        usershare owner only = No
        panic action = /usr/share/samba/panic-action %d
        valid users = %S
        directory mask = 0700

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

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

[storage]
        path = /storage
        valid users = earl
        read only = No

I am thinking something is up with the config file. I have such a headache right now. Can't think straight.

casualfred 09-01-2012 01:50 AM

I think one of the things I like the most about swat is it's huge help sections that explain in detail what all the options do... Maybe take a look at your "security" option in the global section; here's a quote from the swat help on that option:
Quote:

If your PCs use usernames that are the same as their usernames on the UNIX machine then you will want to use security = user. If you mostly use usernames that don't exist on the UNIX box then use security = share.

You should also use security = share if you want to mainly setup shares without a password (guest shares). This is commonly used for a shared printer server. It is more difficult to setup guest shares with security = user, see the map to guest parameter for details.
I don't know what usernames you have on which computers, but could that be an issue?

elarsen 09-01-2012 10:16 AM

I just use samba to store my data on my linux box only. I just have one user that access it, and that is me. I have the same username for win7 and ubuntu. So the user security is no problem.

On another note. Last night I found (I balive an official) ppa for the most recent samba 3.6.4. http://ppa.launchpad.net/automation/ppa/ubuntu If anyone is interested.

elarsen 09-11-2012 06:40 PM

I resolved the issue. I installed xp virtually, and was having issues connecting. So I uninstalled and reinstalled samba. That did not work. I tried to access the win machine through ubuntu, and had an issue. So I reinstalled ubuntu, and now I can access my shares.


All times are GMT -5. The time now is 11:11 PM.