Author Topic: How the heck do you get samba to work with windows 7 and vista <<<SOLVED>>>>>  (Read 4748 times)

Offline kyndscotsman

  • Full Member
  • ***
  • Posts: 56
  • Ain't often right but I've never been wrong
I can't seem to get this dern thing to work. I found a basic guide to samba and followed it. Samba can see my windows 7 notebook and Vista desktop pc but I can't access either of them. The windows 7 wants some sort of username and password and the vista says drive not mounted. Anyone have any suggestions or point me to some better documentation for samba.
« Last Edit: December 19, 2010, 10:55:27 PM by kyndscotsman »

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6254
Re: How the heck do you get samba to work with windows 7 and vista
« Reply #1 on: December 13, 2010, 08:16:04 PM »

do file sharing work as expected btw vista and windows7?

It will be easier if you try to solve one problem at a time, first start by making sure your windows system are correctly configured to allow file sharing. Can you share files btw your windows machines?

When the above is done, then we will go with making pclinuxos seeing shares from both of your windows systems.

When that is done, then we will finish by making your windows system see shares on your pclinuxos box.

Lets start with the first part, Can you share files btw vista and 7 using samba?
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline kyndscotsman

  • Full Member
  • ***
  • Posts: 56
  • Ain't often right but I've never been wrong
Re: How the heck do you get samba to work with windows 7 and vista
« Reply #2 on: December 13, 2010, 08:25:08 PM »
No samba only sees the computers but no files. Both windows pc see each other and share files and printers with no problems.

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6254
Re: How the heck do you get samba to work with windows 7 and vista
« Reply #3 on: December 13, 2010, 08:35:20 PM »

I have not tried to connect to windows7 but i know samba can connect to vista machines.

Is your system fully updated? try to update your system first if it isnt and then try again

can you open the terminal and type this command and post its output here? just press enter when asked for a password

smbtree
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline kyndscotsman

  • Full Member
  • ***
  • Posts: 56
  • Ain't often right but I've never been wrong
Re: How the heck do you get samba to work with windows 7 and vista
« Reply #4 on: December 13, 2010, 08:37:15 PM »
WORKGROUP
   \\BROWN-PC             
MSHOME
   \\KRISTOPHER-PC        
cli_start_connection: failed to connect to KRISTOPHER-PC<20> (0.0.0.0). Error NT_STATUS_CONNECTION_REFUSED
MDVGROUP
   \\LOCALHOST            localhost
      \\LOCALHOST\print$            
      \\LOCALHOST\pdf-gen           PDF Generator (only valid users)
      \\LOCALHOST\Mark              docs
      \\LOCALHOST\homes             Home Directories
      \\LOCALHOST\IPC$              IPC Service (localhost)

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6254
Re: How the heck do you get samba to work with windows 7 and vista
« Reply #5 on: December 13, 2010, 08:56:41 PM »

what computer is named "KRISTOPHER-PC"?

"connection refused" in networking usually means "nobody is on the other side to accept/deny the connection request".
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline kyndscotsman

  • Full Member
  • ***
  • Posts: 56
  • Ain't often right but I've never been wrong
Re: How the heck do you get samba to work with windows 7 and vista
« Reply #6 on: December 13, 2010, 09:02:00 PM »
this is the vista pc with sharing turned on...my windows 7 notbook shares files and its printer with no problems

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6254
Re: How the heck do you get samba to work with windows 7 and vista
« Reply #7 on: December 13, 2010, 09:12:54 PM »

I dont see why your linux system doesnt see shares that are seeing by windows systems, maybe you have a wrong samba setting on your linux box.

what does this command give you?

testparm -s
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline kyndscotsman

  • Full Member
  • ***
  • Posts: 56
  • Ain't often right but I've never been wrong
Re: How the heck do you get samba to work with windows 7 and vista
« Reply #8 on: December 13, 2010, 09:17:34 PM »
print$]
   path = /var/lib/samba/printers
   guest ok = Yes

[printers]
   comment = All Printers
   path = /var/spool/samba
   create mask = 0700
   guest ok = Yes
   printable = Yes
   print command = lpr-cups -P %p -o raw %s -r
   use client driver = Yes
   browseable = No

[Documents]
   comment = Documents
   path = /root/Documents
   read only = No
   guest ok = Yes

Offline muungwana

  • Hero Member
  • *****
  • Posts: 6254
Re: How the heck do you get samba to work with windows 7 and vista
« Reply #9 on: December 13, 2010, 09:48:34 PM »

what does this command give you?

smbclient -V

Did you give the entire output of the command? Your output did not have a global section for some reason.

All your three computers are on different work groups, any reason why? Try to have all your computers under the same workgroup if you can. Different work groups sometimes creates problems that are difficult to troubleshoot.
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline pupthai

  • Hero Member
  • *****
  • Posts: 1426
  • PCLinuxOS 2011 2 - KDE4
Re: How the heck do you get samba to work with windows 7 and vista
« Reply #10 on: December 14, 2010, 02:58:49 AM »
smbtree
I think I see a problem, but I am not expert I kind of keep pushing buttons until it works but-
Example:

HINPRIGIE
        \\PCLOSMAIN                     PClosMain
                \\PCLOSMAIN\CANONiP1900V        CANON iP1900
                \\PCLOSMAIN\IPC$                IPC Service (PClosMain)
                \\PCLOSMAIN\ShareDesk           PCLOSMAIN
                \\PCLOSMAIN\pdf-gen             PDF Generator (only valid users)
                \\PCLOSMAIN\print$         
        \\LAPLIN12G                     localhost
                \\LAPLIN12G\IPC$                IPC Service (localhost)
                \\LAPLIN12G\LaplinShare         LAPLIN12G
                \\LAPLIN12G\pdf-gen             PDF Generator (only valid users)
                \\LAPLIN12G\print$   

Right now I have one workgroup and two hosts with shares showing.
You have three workgroups and only see local shares.
Set a workgroup the same on all PC to shares amoung allowed hosts for that work group.
I only have two PC's up right now but could list 5 sets of shares under one workgroup if others were online.  Adding other workgroups allows you to limit which hosts can use them or you could allow a host to see and use them all in which case I beleave the shares would repeat under each workgroup the PC your on can use.

At least that is my understanding of it. :D
PCLinuxOS 2011 2 - KDE4
Intel 2 core duo @3.22gig, Asus P5G41/M, DDR2/1066 4gig, ENGT220 DDR3/1gig, 2x Seagate 250gig.

Offline kyndscotsman

  • Full Member
  • ***
  • Posts: 56
  • Ain't often right but I've never been wrong
Re: How the heck do you get samba to work with windows 7 and vista
« Reply #11 on: December 14, 2010, 06:16:27 PM »
Ok I made all the computers have the same WORKGROUP name. THis is what I've got now



WORKGROUP
   \\LOCALHOST            
      \\LOCALHOST\IPC$              IPC Service (Samba Member 3.5.6)
   \\KRISTOPHER-PC        
cli_start_connection: failed to connect to KRISTOPHER-PC<20> (0.0.0.0). Error NT_STATUS_CONNECTION_REFUSED
   \\BROWN-PC     

Offline pupthai

  • Hero Member
  • *****
  • Posts: 1426
  • PCLinuxOS 2011 2 - KDE4
Re: How the heck do you get samba to work with windows 7 and vista
« Reply #12 on: December 14, 2010, 07:11:54 PM »
In linux PC in etc/samba/lmhost make a list of hosts and their local ip example
127.0.0.1 localhost
192.168.5.2 250GXP
192.168.5.3 24GXP
192.168.5.4 PCLOSMAIN
192.168.5.5 LAPLIN12G
This is so the workgroup can ID the hosts name to a IP address - in vista or 7 there is something like this as well.  On xp naming the PC seemed to update the host automatically.

also find this in samba.config and make sure the range of local ip is allowed and the netbios name i.e. host is there for this and each Linux box needs it own host name.

netbios name = PClosMain
hosts allow = 192.168.5. 127.0.

Make sure firewall are checked for smb or none no firewall and that the windows fire wall check file and printer sharing.

I have also found that using smb4k on linux made it easier for me to sort it.

On each PC make the shares - on linux after making shares check the bottom of etc/samba/samba.config and you should see example

[pdf-gen]
    path = /var/tmp
    guest ok = No
    printable = Yes
    comment = PDF Generator (only valid users)
    printing = bsd
    #print command = /usr/share/samba/scripts/print-pdf file path win_path recipient IP &
    print command = /usr/share/samba/scripts/print-pdf "%s" "%H" "//%L/%u" "%m" "%I" "%J" &
    lpq command = /bin/true
[printers]
    path = /var/spool/samba
    comment = All Printers
    browseable = no
    printable = yes
    print command = lpr-cups -P %p -o raw %s -r # using client side printer drivers.
    guest ok = yes
    writable = no
    create mode = 0700
    use client driver = yes
[ShareDesk]
    path = /home/pupthai/ShareDesk
    comment = PCLOSMAIN
    browseable = yes
    hide dot files = no

So I will have group HINPRIGIE  this host PCLOSMAIN with a share ShareDesk and all the other printer etc.  each linux PC would have its own stuff in this part.

The windows PC if the share is active and the workgroup is in common and it is not blocked by firewall then they normally show up in smb4k pretty easy and you can mount them.  then smbtree will print them out.  when smb4k scans it will show the woorkgroup check on that it shows the hosts info click on each share and mount them even the local share



Keep poking away at this and they start working. :D

PCLinuxOS 2011 2 - KDE4
Intel 2 core duo @3.22gig, Asus P5G41/M, DDR2/1066 4gig, ENGT220 DDR3/1gig, 2x Seagate 250gig.

Offline kyndscotsman

  • Full Member
  • ***
  • Posts: 56
  • Ain't often right but I've never been wrong
Re: How the heck do you get samba to work with windows 7 and vista
« Reply #13 on: December 14, 2010, 08:57:51 PM »
well so far I ended up going into the system menu and choosing Authentication tab and ended up choosing the Windows Domain option. I then went into the windows 7 machine and made sure file sharing was turned on and also made sure that no password was required so anyone on the network can view the shared folders and such. I likewise did the same with the Vista machine. Restarted all my computers. Now Linux can see and access the Windows 7 machine. It can see the Vista pc but still won't access it. SO I guess I'm halfway there. Still says that the connection is refused. Whenever I go to PCMAN and choose network drives it shows me icons of all my computers...so it does see them....like I said it connects to the Windows 7 machine but whenever I hit the Vista icon it says that unable to get list from server and then says drive not mounted. Here is my output now.



WORKGROUP
   \\LOCALHOST            
      \\LOCALHOST\IPC$              IPC Service (Samba Member 3.5.6)
   \\KRISTOPHER-PC        
cli_start_connection: failed to connect to KRISTOPHER-PC<20> (0.0.0.0). Error NT_STATUS_CONNECTION_REFUSED
   \\BROWN-PC             
      \\BROWN-PC\Users             
      \\BROWN-PC\Q$                Default share
      \\BROWN-PC\IPC$              Remote IPC
      \\BROWN-PC\C$                Default share
      \\BROWN-PC\ADMIN$            Remote Admin

Offline pupthai

  • Hero Member
  • *****
  • Posts: 1426
  • PCLinuxOS 2011 2 - KDE4
Re: How the heck do you get samba to work with windows 7 and vista
« Reply #14 on: December 14, 2010, 10:52:50 PM »
Vista thing looks like it is in vista (the proplem) don't know a thing about vista.  hardly recall that much about xp anymore. 

If all the PC's are booted into linux can you set it up - that would kill half the problem then introduce the win7 etc.  I get normal shares between Linux boxes then join the work-group from a windows box, but I only have 1  XP home edition and  and some XP pro.
PCLinuxOS 2011 2 - KDE4
Intel 2 core duo @3.22gig, Asus P5G41/M, DDR2/1066 4gig, ENGT220 DDR3/1gig, 2x Seagate 250gig.