Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Just bought Red Hat 9 to run on a desktop and want to network with a laptop and another desktop both running Win XP. I can connect to the web through my ADSL router from Linux but can't connect to the Win XP PC's. I read something about Samba being installed to enable this to happen but can't find it in the Linux installation and the help files are just greek to me. How do I install it and set it up?
Really appreciate some advise, my first experience of linux is becoming very frustrating....
Samba will let you communicate and share files between Linux and Windows PC's. I use it to serve files to a Windows Me box, a Windows XP box, and a Linux laptop, all quite seamlessly.
First off, you need to see if it is installed. At a console command prompt type: rpm -qa | grep samba
If the server portion is installed, you should see something like
samba-server-x.x.x.x.yz
samba-common-x.x.x.x.yz
where the x's are version numbers and the yz's are some suffix.
When I run the command, I get
samba-doc-2.2.6-1.0.pre2.2mdk
samba-client-2.2.6-1.0.pre2.2mdk
samba-server-2.2.6-1.0.pre2.2mdk
samba-common-2.2.6-1.0.pre2.2mdk
(I'm running Mandrake 9.0).
If you don't see samba-server but do see samba-client etc., then your machine has the client end, not the server end. I'm quite sure Samba comes with Red Hat 9, so you should be able to install the server portion using
rpm -i samba-server*.rpm
You may have to hunt around on the disks to find it, or you can download it from samba.org if you know how. (You can find binaries for Red Hat at http://us3.samba.org/samba/ftp/Binar...Hat/RPMS/i386/)
It is the most basic documentation on how to network a linux and windows machine using samba that I found. It describes doing this for a sony playstation running linux, but the same config files should be applicable to any linux machine running samba. Good luck.
Q: How do I access Windows shared resources? (#943)
A: To list Windows shares use: smbclient -L computername -U user
example: smbclient -L TEST -U administrator
To mount a Windows shared directory use: smbmount //computername/shared resource name /mnt/mount point -o username=user
example: smbmount //TEST/sharedfiles /mnt/windowsshare -o username=administrator
To access Windows shared directory use: smbclient //computername/shared resource name -U user
example: smbclient //TEST/sharedfiles -U administrator
it will ask for a password which is your administrator password in windows (unless u specified a username - then you'll have to enter that username's password)- after that you should be able to see the windows share files under /mnt/windowsshare [as per this example]
I'm running RH 9 myself and it's working without any problems.
I've given examples based upon this info:
Windows Network: WORKGROUPS - although any LAN-name is fine - it displays everything within a LAN)
System Default Name: TEST
Windows Login User: Administrator / password
Shared Windows Folder called: sharedfiles
Last edited by slackmagic; 08-18-2003 at 01:25 AM.
Thanks for the advice guys. I have Samba installed now and set it up so that I should be able to access the shared files from Win XP.
Trouble is that XP still cant see that RH9 is on the local network so I am no further forward .
retiredsoldier's advice appears to allow me to see the WinXP shared folder from Linux but I want to the the opposite,using Linux as a server and backing up to it and using shared printer etc from it.
Originally posted by gavinc Thanks for the advice guys. I have Samba installed now and set it up so that I should be able to access the shared files from Win XP.
Trouble is that XP still cant see that RH9 is on the local network so I am no further forward .
retiredsoldier's advice appears to allow me to see the WinXP shared folder from Linux but I want to the the opposite,using Linux as a server and backing up to it and using shared printer etc from it.
Any help much appreciated.
Thanks
If you have samba server installed, that should be no problem at all. I did that just yesterday between my MAndrake 9.1 box and my Windows 2000 Professional box. The share is perfectly accessible and the person at the windows end won't even realize that he is talking to a linux box. But make sure that sharing is enabled. You have to be Root for that.
Dunno abt RH but in Mdk that is as simple as right clicking on the folder in question, clicking on "properties"-"sharing"-"Configure Sharing"-Entering Root Password at the prompt-and ticking the appropriate check boxes. But it requires you to make sure that the system was set up to be a network server during the initial setup.
If the problem is that the Windows box doesn't see the Linux box in the Windows Box's Network Neighborhood, it might be because you do not have (or have mistyped, like I did) the "hosts allow" line in the Samba configuration file.
The [global] section of the Samba configuration file at /etc/samba/smb.conf should have a line in it like:
hosts allow = [local network]/[subnet mask]
Mine has
hosts allow = 192.168.1.0/255.255.255.0
I believe this line is necessary to allow the Windows machine to see the Samba box when the Windows box queries the network to see what resources are out there.
Thanks a lot for all your posts. I must be doing something wrong because I get a message saying
"Couln't display "SMB ///" because Naultilus cannot connect to the master browser. Check That SMB is running in the master browser"
Dont have a clue what this means because there appears to be no help file associated with it but I wonder if this is the reason that I can't see Samba in XP network Neighborhood.
I am persevering here but its back to Windows if I can't crack this soon.
Confused and frustated but really appreciate help.
If you could post your smb.conf file, we'll take a look at it.
Also, Nautilus is a Linux file browser. Are you trying to browse the Samba shares using Nautilus on the same machine that Samba is running on, or on a different one? (If on the same one, why? I would think you could browse the shared directories directly rather than using Samba.)
I'm getting there thanks to your help. Xp can now see the Linux box in Network Neighborhood but cant acess it. Says dont have permission.?
Not too sure why this is the case because I set up the samba server as described in the help file. Could it be the [global] section of the smb.config file to change the hosts allow.
My smb.config reads
global]
# workgroup = NT-Domain-Name or Workgroup-Name
# server string is the equivalent of the NT Description field
server string = silverserver
# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
; hosts allow = 192.168.1. 192.168.2. 127
Is this what I need to change and if so how. I cant see how to edit this file to 192.168.1.0/255.255.255.0
Thanks for all the advice so far. I reckon I am nearly there....
If you use the KDE desktop, there's a nice text editor called Kate. I am not as familiar with Gnome, but I'm sure there is an equivalent. Look on the menus for text tools, or text editors (I'm not at a Linux machine right now, or I'd look it up). If you use the command line, vi is the standard command line editor, vim is its more powerful cousin, both take some getting used to if you are new to Unix/Linux.
You might try just deleting the semicolon in front of "hosts allow" -- what follows the "hosts allow" should work, although the "192.168.2" part is probably extraneous if yours is like most home networks. (This assumes your internal network IP address is 192.168.1., which is what most home networks are likely to be.)
If you are trying to browse the samba share from the machine the samba server is also actually running on, you'll need the "127" part of the entry to allow the localhost -- that's the local machine -- to access the samba share.
Thanks for all the advice.
I@ve got WinXP showing up the samba server (localhost) on Neytwork Neighnorhood now but for some weird reason it will let me see the contents of the shared file and allow access but next time I try it says I dont have acess rights and wont let me in.
Is this something to do with Samba . Each time I go into samba to configure the server settings I see that workgroup name has to be entered again. Does this mean it doesnt remember it?
Also once I have this running properly I have VPN installed on Xp and want to see the access the Linux desktop from it. Any ideas on how I do this .
for the VNC issue, I'd recommend you to start a new thread - before you might wanna do that, go on search through the LQ forums - this thing has been discussed numerious times and there should be some answer out there, if not, you might wanna try google as well, but yeah, it's possible and actually pretty simply to use vnc (realvnc and/or tightvnc).
Maybe later today (it's currently 6am ) I might repost and tell you the way I got it all to work.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.