Find the answer to your Linux question:
Results 1 to 6 of 6
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    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?

  2. #2
    First of all, Welcome to Linux Forums!

    Question 1.)

    Linux computer (as root): ifconfig

    ifconfig will output something like this:
    eth0      Link encap:Ethernet  HWaddr 00:15:58:1e:37:74  
              inet addr:  Bcast:      Mask:
              inet6 addr: fe80::215:58ff:fe1e:3774/64 Scope:Link
    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 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)

    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 or (I've seen belkins which use 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.

    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

    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.

    Linux since: 2001
    Gentoo since: 2004
    - - - - - - - -
    I fix things until they break.

  3. #3
    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
    emacs /etc/samba/smb.conf
    . I found samba init under
    /etc/init.d/smb start
    . I got into my router configuration with 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.

    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.

  4. $spacer_open
  5. #4
    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.

    emacs /etc/samba/smb.conf
    workgroup = WORKGROUP
    Browsing the Windows computer from Linux

    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.

    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!

  6. #5
    Super Moderator Roxoff's Avatar
    Join Date
    Aug 2005
    Nottingham, England
    Quote Originally Posted by virx61 View Post
    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.
    That'll probably be down to the permissions applied in Windwos to the shares. Right-click on your shared folder, select sharing and edit the permissions. You may find that it's been given a conservative set of sharing privileges.
    Linux user #126863 - see

  7. #6
    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:

    cd .gnome-desktop
    chmod +rwx Network.desktop
    cp Network.desktop /home/<username>/.gnome-desktop/
    cp Network.desktop /home/<username>/Desktop/
    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.

    Information for sharing folders is stored in smb.conf. Add lines like these to smb.conf to share folders:
       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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts