Results 1 to 6 of 6
I have a simple network hardware setup. My wireless Linksys router supplies internet and local network access to a wireless laptop running Windows Vista and a hardwired desktop computer. The ...
- 10-21-2008 #1Just Joined!
- Join Date
- Oct 2008
- Posts
- 20
Linux/Windows Networking Newbie
I have a simple network hardware setup. My wireless Linksys router supplies internet and local network access to a wireless laptop running Windows Vista and a hardwired desktop computer. The desktop in question used to run Windows XP but without warning I formatted the drive and installed Mandrake 9.1. The internet still works just fine for both computers, as expected. What I want is a working local network.
I'm new to Linux and Linux networking. My first goal is to allow access from my Linux system to shared folders on the Windows laptop. So my questions are as follows:
How can I find the IP addresses, domain names, workgroup names, etc. for both of the computers and the router?
How do I use SAMBA to allow access from Linux to Windows through the router?
- 10-21-2008 #2
First of all, Welcome to Linux Forums!
Question 1.)
Linux computer (as root): ifconfig
ifconfig will output something like this:
Since you are hardwired, you are looking for your eth0 connection. We can see from my output that the inet address for the eth0 connection is 192.168.1.3. This is the ip address that the router assigned. (since the ifconfig can be large, I often do 'ifconfig | grep inet' in order to find what I need faster)Code:eth0 Link encap:Ethernet HWaddr 00:15:58:1e:37:74 inet addr:192.168.1.3 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::215:58ff:fe1e:3774/64 Scope:Link
Your domain/workgroup name needs to be set up with samba. I am assuming you have samba installed. so:
nano /etc/samba/smb.conf
# 1. Server Naming Options:
# workgroup = NT-Domain-Name or Workgroup-Name
workgroup = WORKGROUPNAME
You should set this workgroup name to whatever you want it to be. Then you need to set your laptop to have the same workgroup/domain name. (be sure you have your samba service started /etc/init.d/samba start)
Look in your router manual to find what the default ipaddress of the router will be set to. In most cases this will be 192.168.0.1 or 192.168.1.1 (I've seen belkins which use 192.168.2.1). You can perform router tasks by pointing your web browser (sometimes it is necessary to be hardwired to the router... so from your linux computer) to that address. ex. http://192.168.1.1
Question 2.)
Once your laptop and your desktop are on the same workgroup things are pretty easy.
You can just use konqueror (if you use kde) to temporarily connect using an address like this
smb://laptopname/sharname
Otherwise you can mount the samba share to a folder. I do this if I am going to be using it a lot. (note, there is a kernel option which may need to be enabled under file systems-->network file systems-->smb file system support)
You can use the mount command something like this
mount -t smbfs -o username=youruser,password=yourpasswd //servername/sharename /path/to/mount/point
I think that should at least be enough to get you started.
SethLinux since: 2001
Gentoo since: 2004
- - - - - - - -
Translation:
I fix things until they break.
- 10-21-2008 #3Just Joined!
- Join Date
- Oct 2008
- Posts
- 20
Thanks for the warm welcome.
Mandrake didn't come with nano and I don't know how to use vim so I edited smb.conf with. I found samba init underCode:emacs /etc/samba/smb.conf
. I got into my router configuration with http://192.168.1.1 easily enough and ifconfig is useful, so you've been very helpful. I won't know if any network stuff works until tonight when I can try to browse the laptop with konqueror or nautilus, so I will update when I do.Code:/etc/init.d/smb start
Thanks a lot for the help, and its good to meet a fellow Gentoo user! I'm a former one myself, and only just started with Mandrake.
- 10-22-2008 #4Just Joined!
- Join Date
- Oct 2008
- Posts
- 20
Its working. Making sure the workgroup names match apparently makes everything click if Samba is already installed and running. I simply changed the Linux computer's domain to WORKGROUP so it would match Windows.
Browsing the Windows computer from LinuxCode:su <password> emacs /etc/samba/smb.conf workgroup = WORKGROUP
I just browse to the network or the other computer by typing any of the following locations in Nautilus or Konqueror:
Sometimes SMB doesn't seem to be working but it just takes some time to sync up with the network I guess. Also sometimes the Windows computer doesn't show up in smb://WORKGROUP but is accessible by using smb://<computername>. Also, Nautilus or Konqueror will ask for a username and password if the Windows computer has any, so you will have to log in as a user of the Windows computer. After that, any files or folders the Windows computer is "Sharing" are available to read or copy. I haven't been able to write to Windows.Code:smb:// smb://WORKGROUP smb://<computername>
Browsing the Linux computer from Windows
I used Nautilus and clicked "Share" on some folders I wanted to share over the network. These folders were then accessible from the Windows computer by clicking on Start-->Network--><computername>. No login was necessary because the folders are deliberately shared. Again files are available to read and copy but write permission is denied.
In all, this was a major success for my home network and it was quite easier than I expected. Long live Linux!
- 10-22-2008 #5Linux user #126863 - see http://linuxcounter.net/
- 10-24-2008 #6Just Joined!
- Join Date
- Oct 2008
- Posts
- 20
I'll try fiddling with the permissions on both computers to see if I can't get read/write access both ways.
In any case, I have functional network access now and that makes me happy. I created a desktop launcher for Command: nautilus smb:// and named it "Network", then used the following commands to put this icon on all the other users desktops:
However I do have some questions to follow up with. 1: When logging onto the Windows computer through the browser, if the wrong username or password is entered access is denied to that computer until the Linux user completely logs out and back in. Restarting Nautilus does not allow entering username and password again and I wonder if there isn't a way to fix it without completely logging out of the user. 2: Is there a way to change which Linux folders are shared without using Nautilus? Perhaps shared folders are designated by a Samba config file, but I don't know. 3: Is there a graphical Samba configuration tool? The Mandrake tools I have aren't comprehensive.Code:su <rootpassword> cd .gnome-desktop chmod +rwx Network.desktop cp Network.desktop /home/<username>/.gnome-desktop/ cp Network.desktop /home/<username>/Desktop/
Edit:
2: Information for sharing folders is stored in smb.conf. Add lines like these to smb.conf to share folders:
Code:[DOCUMENTS] path = /home/<username>/Documents comment = /home/<username>/Documents public = yes guest ok = yes writable = no
Last edited by virx61; 10-24-2008 at 02:06 PM. Reason: new information


Reply With Quote
