LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-02-2011, 06:36 PM   #1
Casual Linux
LQ Newbie
 
Registered: Jan 2011
Posts: 9

Rep: Reputation: 1
Can't see Linux shared drive from Windows


All my windows PC's show the Linux computer in the network -but that's it. No sign of anything on the Linux computer.

I built a Linux box, two drives. Linux OS on first drive, Second drive (320MB) is one FAT32 partition. Mount point for second drive is /mnt/windows. I set it up in Samba as shared with read, write, and browse all set to "yes".

From other computers connected to my router (XP and Vista OS) I can see the Linux computer (Icon shown with the computer name), I can successfully ping it's IP address -but I can't see any drives or directories on it. No error codes, no password requests.

In the network neighborhood in windows it shows the Linux machine, but when i click on it, I only get "properties" which does not include any drives or directories.

I'm really stuck here -I don't know what's missing in the network configuration or how to troubleshoot this (no error message). How do I get /mnt/windows on the Linux machine visible to the windows computers?
 
Old 01-02-2011, 07:44 PM   #2
jmc1987
Member
 
Registered: Sep 2009
Location: Oklahoma
Distribution: Debian, CentOS, windows 7
Posts: 872

Rep: Reputation: 112Reputation: 112
Im not a samba expert but I think you need to find a option in your samba config files I think its samba.conf, But there is an option that is relevent to showing yoru computer on the network.
 
Old 01-02-2011, 07:58 PM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
Would be helpful if you actually would show us your config-file.
 
Old 01-02-2011, 10:47 PM   #4
Casual Linux
LQ Newbie
 
Registered: Jan 2011
Posts: 9

Original Poster
Rep: Reputation: 1
If I knew where to find it (config file) I would attach it. More info on the situation:

XP computer (connected to router via ethernet cable) now has no trouble accessing the Linux drive, I've mapped it and transferred files.

Vista computer (connected to router via wireless) sees the Linux machine as a "Device" -but still won't show any directories or other substance. Won't show the computer as part of the network map (lists it and says it can't include it) -but I can successfully ping to it's IP address using the Vista console mode.

I've found lots of hits about Vista and Samba compatibility problems, most deal with password issues -but I'm not getting any error messages or password prompts.
 
Old 01-02-2011, 10:50 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,130
Blog Entries: 2

Rep: Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825Reputation: 4825
May I ask how you actually configured your Samba server if you don't know where your config file is?
But anyways, it should be the file /etc/samba/smb.conf.
 
Old 01-02-2011, 10:56 PM   #6
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
I managed to create a share on my Ubuntu 10.04 machine that can be mounted on Windows 7. I used SWAT to create the configuration. I used USER level security. I put the machine in its own work group.

I could browse the share several configuration adjustments before I could mount it.

Here is my /etc/samba/smb.conf file.

Code:
# Samba config file created using SWAT
# from UNKNOWN (127.0.0.1)
# Date: 2010/12/24 10:59:07

[global]
	workgroup = SAMBA
	server string = %h server (Samba, Ubuntu)
	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* .
	unix password sync = Yes
	syslog = 3
	log file = /var/log/samba/log.%m
	max log size = 1000
	dns proxy = No
	usershare allow guests = Yes
	panic action = /usr/share/samba/panic-action %d

[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

[user1]
	path = /home/user1
	username = user1
[printers]
	comment = All Printers
	path = /var/spool/samba
	create mask = 0700
	printable = Yes
	browseable = No
	browsable = No
 
Old 01-02-2011, 11:53 PM   #7
Casual Linux
LQ Newbie
 
Registered: Jan 2011
Posts: 9

Original Poster
Rep: Reputation: 1
to Tobi #5 reply
How I configured Samba without knowing where the config file is: I haven't used text based Linux in over 10 years. I installed Mandriva distribution and did everything by menus in the GUI.

I'll have to hunt down that file, CP it to the shared partition, pull it up on the XP machine, then find this blog and send it to you. Does this blog allow for a reply to be right under the relevant post? I couldn't find how to do that -makes it hard to follow replies to replies.
 
Old 01-03-2011, 12:00 AM   #8
rentalsolutions
LQ Newbie
 
Registered: Feb 2010
Posts: 14

Rep: Reputation: 0
Can't see Linux shared drive from Windows

It should be the file /etc/samba/smb.conf.

Last edited by Tinkster; 01-03-2011 at 03:59 AM.
 
Old 01-03-2011, 02:14 PM   #9
Casual Linux
LQ Newbie
 
Registered: Jan 2011
Posts: 9

Original Poster
Rep: Reputation: 1
smb.conf file

I've attached the smb.config file. I opened it in windows Notepad and it was quite a mess. Lots of comments and special characters, I was expecting simple text. I could clean out the comment lines since they are marked with # -but the wrapping and special characters means there's a good chance I'll alter some of the important substance or context.

My Linux box has a problem resolving internet domain names -can reach my router and my DSL modem OK, and is readable from my win XP box, but something is wrong with DNS settings. So I'm not able to cut and paste this into the forum from my linux box.

Everything is working great with file server to the Win XP box (cat 5 connected to router). The Vista notebook (wi-fi)sees the Linux machine as a "device" but no shares, and won't include it on the network diagram.
 
Old 01-03-2011, 02:16 PM   #10
Casual Linux
LQ Newbie
 
Registered: Jan 2011
Posts: 9

Original Poster
Rep: Reputation: 1
Oops here's the file

Left it off from my previous reply. Welcome hints on how to unscramble the appearance in Windows.
Attached Files
File Type: txt smb.txt (20.7 KB, 51 views)
 
Old 01-03-2011, 02:28 PM   #11
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
Quote:
Originally Posted by Casual Linux View Post
I've attached the smb.config file. I opened it in windows Notepad and it was quite a mess.
Quote:
Originally Posted by Casual Linux View Post
Left it off from my previous reply. Welcome hints on how to unscramble the appearance in Windows.
Text files in Linux/UNIX are formatted slightly differently than text files in Windows. Specifically, text files in Linux/UNIX just use a line feed character at the end of each line while Windows uses the line feed+carriage return at the end of each line.

You can convert a UNIX text file to an MS-DOS text file by running it through the unix2dos utility.
Code:
unix2dos smb.conf
http://en.wikipedia.org/wiki/Unix2dos

Here is a version that runs on Windows.
http://download.cnet.com/Unix2DOS/30...-10488164.html

Your attached smb.txt file looks fine to me because I am reading it on a Linux machine.

Evidently you haven't even looked at the smb.conf file that I put into my first reply. (#6)

Last edited by stress_junkie; 01-03-2011 at 02:31 PM.
 
Old 01-03-2011, 02:47 PM   #12
ichase
Member
 
Registered: Jul 2010
Location: Virginia Beach, Virginia
Distribution: Arch
Posts: 67
Blog Entries: 4

Rep: Reputation: 3
If in doubt as to where a particular file is, in terminal type:
Code:
whereis smb.conf
This works for any file where you know the name but do not know where exactly it is located. It will provide you the path of the file.

But as mentioned before, the file will be located in /etc/samba/smb.conf

Ian

Last edited by ichase; 01-03-2011 at 02:49 PM.
 
Old 01-03-2011, 04:15 PM   #13
Casual Linux
LQ Newbie
 
Registered: Jan 2011
Posts: 9

Original Poster
Rep: Reputation: 1
Yes I did read reply #6

Stress-Junkie

Yes, I did look at your config file. I wondered who pam was. I also wondered what "map to guest" meant and what setting it to "bad user" would do. The problem is the file is meaningless to me since I don't know the what the terms and syntax mean. Is there something specific in the file you want to make reference to?

I'm doubting that my problem is in the Samba config file unless I need to fill in a name for Netbios.

My XP machine can read the Linux shared partition with no problems.

I'm trying to find out why Vista sees the Linux machine but:
Doesn't list it as part of the "RIEDELS" workgroup
Won't show the shared drive
Windows network and sharing reports The following discovered devices can not be placed map. (It also lists my daughter's Windows 7 machine in that category.)
 
Old 01-03-2011, 04:28 PM   #14
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 332Reputation: 332Reputation: 332Reputation: 332
Quote:
Originally Posted by Casual Linux View Post
Stress-Junkie

Yes, I did look at your config file. I wondered who pam was. I also wondered what "map to guest" meant and what setting it to "bad user" would do. The problem is the file is meaningless to me since I don't know the what the terms and syntax mean. Is there something specific in the file you want to make reference to?

I'm doubting that my problem is in the Samba config file unless I need to fill in a name for Netbios.

My XP machine can read the Linux shared partition with no problems.

I'm trying to find out why Vista sees the Linux machine but:
Doesn't list it as part of the "RIEDELS" workgroup
Won't show the shared drive
Windows network and sharing reports The following discovered devices can not be placed map. (It also lists my daughter's Windows 7 machine in that category.)
I put that as a working configuration file. If you copied it to your machine it would work. You would simply have to change the path to the share. There is no single thing to look at. The entire thing is taken as a whole as a working configuration.

Pam is the software that authenticates user logins. (Pluggable Authentication Module = PAM)

If you want to know what each piece means then you can look it up.
http://www.centos.org/docs/5/html/De...nfiguring.html

What do you mean the XP machine can read the shared partition? Do you mean that it is on the same machine that you are trying to configure Samba Server? Or do you mean that the XP machine can connect to the share over the network?

If you noticed in my first post I said that I put the Samba server in its own work group. I did that deliberately. You should try to do the same rather than getting Samba to join your existing work group. Note that Windows 7 home networking is a lot different than XP home networking.

==

There is another step to make it all work. You have to add Linux users to the Samba software user list.
1) The Samba user has to already have a working user account in Linux on the same machine.
2) Use the smbpassword -a <username> to add Linux users to the Samba user list.

This Samba user instruction applies only to stand alone servers. This is what you want for your home.

Last edited by stress_junkie; 01-03-2011 at 04:36 PM.
 
Old 01-03-2011, 07:23 PM   #15
Casual Linux
LQ Newbie
 
Registered: Jan 2011
Posts: 9

Original Poster
Rep: Reputation: 1
<quote: What do you mean the XP machine can read the shared partition? Do you mean that it is on the same machine that you are trying to configure Samba Server? Or do you mean that the XP machine can connect to the share over the network?>

The XP machine is a separate machine and can connect to the share (the Linux machine with shared partition) over the network.

I believe in the past, windows machines had to be in the same workgroup to see each other in a windows home network. I am surprised you made a separate workgroup for the server. You mention you did this deliberately, what is the advantage?

Didn't want to do a whole copy of your configuration, because mine is working also -with the connection between the Linux machine and the XP machine, and I can edit it with the same program I set it up with.

I really wish there was a better debugging approach. I've doofed up something with the Vista machine, or Microsoft has added a quirk somewhere in Vista. When I debug machines (besides computers) I track the symptoms to the cause. Here I can't seem to track anything down, or test parts of the system.

FACTS:
The Vista machine has no trouble going through the router to the modem and online -safe to say connections are all good.
It can "ping" the Linux machine and get a reply.
It displays the Linux machine as Mandriva2008.1 -which means it does get some information from the Linux machine.
It (in Network and Sharing Center)does not show the Linux machine as a computer -it calls it a "device".
It does not list a workgroup for the Linux computer -even though the Linux machine's Samba config file lists its workgroup name.

Your idea about adding users is interesting. I am listed as a user -same ID- on all three computers, and I did set myself up on the user list in the Samba configuration.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to access a shared Windows drive from Linux? concoran Linux - Software 4 04-29-2008 05:15 AM
Do linux distros install to Windows on shared drive? Honeysuckle General 5 04-26-2008 04:45 PM
How to mount windows shared drive in to the linux nhsarvaiya Linux - Server 1 08-31-2007 11:08 AM
Windows sees Samba shared drive; Linux can't tnandy Linux - Networking 3 09-13-2004 02:00 PM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration