LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Unable to see my windows box in linux (https://www.linuxquestions.org/questions/linux-networking-3/unable-to-see-my-windows-box-in-linux-254843/)

lbabey 11-14-2004 06:13 PM

Unable to see my windows box in linux
 
Hi, i am running Mandrake 10.0 on my laptop, and i am attempting to network this and a win XP home desktop, which is the server. I have Samba installed and I have edited the smb.conf file in such a way that i can see and access my linux box from win XP. The thing is, I can't see my windows box at all in mandrake. I am able to connect to the internet in linux via my win XP server desktop. So it's partially there but not quite...can anybody help me figure out the final piece of the puzzle?

Thanks much!

:newbie:

trickykid 11-14-2004 07:55 PM

Do you actually have a share to mount or view from the Windows box? Can you ping the Windows machine?

lbabey 11-14-2004 08:39 PM

Yes, I can ping the Windows Machine by its name and by its ip address in linux. I can also ping the linux machine's netbios name and its ip address from windows. I am seeing the linux machine in my workgroup computers and can access all its shared directories, in windows XP. I just can't see the desktop computer under Samba mount points....and i thought i would automatically see the shared directory from the windows XP box in linux? I didn't know I had to manually set it up to do this....
Still need some help on this please?

Thank you!

scott2004 11-14-2004 10:00 PM

use smbclient
 
I'm no expert, but here goes:

The smb server samba is distinct from the smbclient. The server consists of two daemons, smbd and nmbd, serves file shares to Windows machines and runs on Linux. The smbclient allows you to connect to file shares on other machines both Windows and LInux. You need to use the client or mount to connect to the Windows shares.

Option 1: You can mount the Windows file share to your local file system

Use mount like so (need to be root or have sudo priveleges to mount anything):

#mount -t smbfs //windowsXPMachineAddress/name_of_share -O username=user,passwd=password /mount_point

Notes: You can use the Windows network name or the machine's IP address (the network name may not work if it is not in your hosts list.)
- /mount_point is the place in your filesystem where you want to mount the file share you could use /mnt/share after you mkdir /mnt/share.


Option 2: You can use the smbclient like so:

$smbclient //windowsXPMachineAddress/name_of_share (or something like that)

Check the man pages ($man smbclient or $man mount) to check for the exact syntax.

General: I suspect that after you add the Windows machine to your local hosts file (which is a list of names and ip addresses of LAN computers) you will be able to see these in your Network window. Mounting shares from them will probably cause Linux to register them in hosts which will achieve the same effect. This seems to be what happened in the case of my mixed LAN.

Cheers,
Scott

lbabey 11-14-2004 10:46 PM

Thanks both of you..I can now see my windows shared directory in linux. I created the /mnt/share using mkdir. Then i mounted my shared files from windows to this linux directory by using this command:

# smbmount \\My_XP_box_name\SharedDocs \mnt\share
Then they asked for a password. I typed my root password and it worked! I seeing all the shared files in the share directory i created under mnt. and i can access everything.

Still can't see the XP machine under Samba mount points, but what's going on now is fine with me! Thanks a lot!

scott2004 11-15-2004 08:42 AM

cool - a little more info
 
Great! Just checked out 'smbmount'. Turns out it is a short hand for "mount -t smbfs". Further, you do not need to specify your username and password--I was wrong. if you do not specify a username, Linux connects you using your linux user name (whoever you are logged in as) so that so long as you have an account with the same username on both machines, you're fine. Otherwise you would have to specify the Windows username. If you do not specify a password, it requests this. This must be the password on the Windows machine, which in your case, must be the same as your root password in Linux. I suppose if your Windows machine did not have a password, you might not get prompted for one, or you might just hit enter when prompted. In any case, I'm sharing this just because I like to know how things work so that I can fix them when they don't.

Happy file sharing!

Scott


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