Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11th July 2011, 11:06 PM
vdn20 Offline
Registered User
 
Join Date: Apr 2011
Posts: 9
linuxchrome
Connect to Windows PC on Network

Hi, I'm not sure if I'm posting in the right section, but can someone tell me how to set up my laptop with Fedora 15 so I can see my other Windows computer on the network so I can access the files on it? I'm still new to Fedora so the more detailed the better it is for me. Thank you.
Reply With Quote
  #2  
Old 12th July 2011, 11:27 AM
glennzo's Avatar
glennzo Online
Un-Retired Administrator
 
Join Date: Mar 2004
Location: Salem, Mass USA
Posts: 13,934
linuxfirefox
Re: Connect to Windows PC on Network

A good place to start would be by installing Samba.
PHP Code:
su -'yum install samba' 
Start the services.
PHP Code:
su -'systemctl enable smb.service'
su -'systemctl enable nmb.service'
su -'systemctl start smb.service'
su -'systemctl start nmb.service' 
Give the network a few minutes and then see if you can view Windows shares. If it works, great. If not there are likely a few more settings necessary.
__________________
Glenn
The Bassinator © ®


Laptop: Toshiba Satellite / Intel Core 2 Duo 1.73 GHz / 2GB / 160GB / Intel Mobile 945GM/GMS/GME/943/940GML Integrated Graphics
Desktop: BioStar MCP6PB M2+ / AMD Phenom 9750 Quad Core / 4GB / 1TB SATA / 500GB SATA / EVGA GeForce 8400 GS 1GB
Reply With Quote
  #3  
Old 12th July 2011, 12:12 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,108
linuxfedorafirefox
Re: Connect to Windows PC on Network

You missed - he wants the client software, not the server.

Try installing the ntfs-client package.
Reply With Quote
  #4  
Old 12th July 2011, 05:25 PM
vdn20 Offline
Registered User
 
Join Date: Apr 2011
Posts: 9
linuxchrome
Re: Connect to Windows PC on Network

Quote:
Originally Posted by glennzo View Post
A good place to start would be by installing Samba.
PHP Code:
su -'yum install samba' 
Start the services.
PHP Code:
su -'systemctl enable smb.service'
su -'systemctl enable nmb.service'
su -'systemctl start smb.service'
su -'systemctl start nmb.service' 
Give the network a few minutes and then see if you can view Windows shares. If it works, great. If not there are likely a few more settings necessary.
I tried, but didn't work

Quote:
Originally Posted by jpollard View Post
You missed - he wants the client software, not the server.

Try installing the ntfs-client package.
I did a yum search for ntfs-client, but couldn't find it. Can you tell me where to find it?

Right now, it just say
Unable to mount location. Failed to retrieve share list from server
when I try to click into the Windows Network

Last edited by vdn20; 12th July 2011 at 05:41 PM.
Reply With Quote
  #5  
Old 12th July 2011, 06:20 PM
DBelton's Avatar
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 6,612
linuxfirefox
Re: Connect to Windows PC on Network

Now I have never had to do all of that to connect to a windows share here.

I have just mounted the share as cifs or smbfs... Or I have just gone to places-->connect to server (OR in nautilus, FIle-->Connect to server, then select Windows Share from the dropdown box for type.

Put the server address in, the windows share name in, and for domain, put your windows workgroup name or domain name.
The user name and password are required if the windows machine requires them. (use the windows name/password, not your linux name/password)
Reply With Quote
  #6  
Old 14th July 2011, 04:24 PM
vdn20 Offline
Registered User
 
Join Date: Apr 2011
Posts: 9
linuxchrome
Re: Connect to Windows PC on Network

Quote:
Originally Posted by DBelton View Post
Now I have never had to do all of that to connect to a windows share here.

I have just mounted the share as cifs or smbfs... Or I have just gone to places-->connect to server (OR in nautilus, FIle-->Connect to server, then select Windows Share from the dropdown box for type.

Put the server address in, the windows share name in, and for domain, put your windows workgroup name or domain name.
The user name and password are required if the windows machine requires them. (use the windows name/password, not your linux name/password)
I'm not exactly sure what you are talking about, but my Windows PC isn't a server yet, just a regular PC on the network
Reply With Quote
  #7  
Old 14th July 2011, 05:30 PM
PabloTwo's Avatar
PabloTwo Offline
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,128
linuxfirefox
Re: Connect to Windows PC on Network

Quote:
Originally Posted by vdn2
I'm not exactly sure what you are talking about, but my Windows PC isn't a server yet, just a regular PC on the network
Hello vdn20,

As DBelton suggested, I also do a cifs mount of Windows shares that are on my local LAN. Overall I think it's the simplest way of getting access to those shares from Fedora. But some things you need to know.

You do not have to do any special setup for your Windows machines(s) to run as a server.

You DO need to set any drives/folders on your Windows machines(s) that you want to access from Fedora to be shared. You do that in Windows.

You cannot mount and access a Windows drive/folder from Fedora that is not shared.

The security level and access permissions you set for each Windows share will determine whether a user login ID and password is required or not to mount and access each share.

Here is an example of how I cifs mount a shared "drive" on both my wife's Windows XP desktop and her Windows 7 laptop. Both have a separate "drive" that holds data. Both of those "drives" have the share name of "Data". Since we are the only two in this household and security is not an issue, both of those shares are set to allow "Everybody" with read and write access, so no user ID and password are required in this case.

The XP desktop machine has an IP address of 192.168.1.2 and the W7 laptop has an IP address of 192.168.1.4. I have created mount points for each.... /media/cortana and /media/alyx. (In F15, you should not use /media to setup any "permanent" mount points, use /mnt instead).

In the /etc/hosts file I have mapped those IP addresses to the respective computer (host) names, though you could use any name you like.
Code:
BASH:~/-> cat /etc/hosts
# hostname speedie.localdomain added to /etc/hosts by anaconda
127.0.0.1	speedie	localhost.localdomain	localhost	speedie.localdomain
::1	speedie	localhost6.localdomain6	localhost6	speedie.localdomain6
192.168.1.2	cortana2
192.168.1.4	alyx
Though I normally do this through a script that lets me choose which machine to access, the commands that do the actual mounting are:
Code:
mount.cifs //alyx/Data /media/alyx -o uid=500,gid=500,sec=none
mount.cifs //cortana2/Data /media/cortana -o uid=500,gid=500,sec=none
The mount point directories /media/cortana and /media/alyx are owned by my regular user (since I'm the only user on this machine) so permissions are not an issue. You can just use the IP address directly rather than define a hostname in the mount.cifs command (or "mount -t cifs" which does the same thing).

The "mount.cifs" and "umount.cifs" commands I use are actually older ones that allowed them be setUID, which allows me to run my mount script as a regular user and not root. That feature was taken away somewhere mid-life of F12.

For convenience, I also placed these entries in /etc/fstab:
Code:
//cortana/Data		/media/cortana		cifs	uid=500,gid=500,noauto,credentials=/home/paulm/.secret 0 0
//cortana2/Data		/media/cortana		cifs	uid=500,gid=500,noauto,sec=none 0 0
//alyx/Data		/media/alyx		cifs	uid=500,gid=500,noauto,sec=none 0 0
That allows me to do a quick and dirty:
Code:
sudo mount /media/alyx
without calling up the script. Hope this gives you some clue as to how to proceed from here. You don't need to make things as detailed and involved as I've described here, but you do need to do three basic things at a minimum.

1) create the share(s) on the Windows machine(s)

2) sudo mkdir /mnt/some_name

3) sudo mount.cifs //IPaddress/sharename /mnt/some_name

Last edited by PabloTwo; 14th July 2011 at 05:42 PM.
Reply With Quote
  #8  
Old 14th July 2011, 11:36 PM
DBelton's Avatar
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 6,612
linuxfirefox
Re: Connect to Windows PC on Network

PabloTwo covered things nicely up there

And as he states, /media is not a good place for permanent mounts on F15. Someone in their oh so infinite wisdom now mounts /media as tmpfs in the system startup. (I do believe the culprit is systemd)
Reply With Quote
  #9  
Old 15th July 2011, 01:06 PM
jpollard Offline
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,108
linuxfedorafirefox
Re: Connect to Windows PC on Network

I think mounting /media as tmpfs is a concession to SSDs.

Using /media as a mount point area, which most USB mounts use /media/<specific volume>, and then delete after dismount.. causes a lot of updates on the /media directory. These updates are not wanted on something that ends up as an empty directory. Therefore, mounting /media as tmpfs is a valid thing to do.
Reply With Quote
  #10  
Old 15th July 2011, 02:15 PM
DBelton's Avatar
DBelton Offline
Administrator
 
Join Date: Aug 2009
Posts: 6,612
linuxfirefox
Re: Connect to Windows PC on Network

I had not thought of that.

That does make a lot of sense, though. I would guess that even though you are writing to another filesystem (usually on a different physical device) it still causes updates on the mount point. I/O that is not needed on a SSD.

I haven't changed my fstab over yet, and all of my drives are still being mounted in /media. I wonder if that is why I experienced a slowdown on one of my boxes. After all, I have 12 internal drives and another 8 externals being mounted in /media.
Reply With Quote
  #11  
Old 15th July 2011, 05:50 PM
vdn20 Offline
Registered User
 
Join Date: Apr 2011
Posts: 9
linuxchrome
Re: Connect to Windows PC on Network

Quote:
Originally Posted by PabloTwo View Post
Hello vdn20,

As DBelton suggested, I also do a cifs mount of Windows shares that are on my local LAN. Overall I think it's the simplest way of getting access to those shares from Fedora. But some things you need to know.

You do not have to do any special setup for your Windows machines(s) to run as a server.

You DO need to set any drives/folders on your Windows machines(s) that you want to access from Fedora to be shared. You do that in Windows.

You cannot mount and access a Windows drive/folder from Fedora that is not shared.

The security level and access permissions you set for each Windows share will determine whether a user login ID and password is required or not to mount and access each share.

Here is an example of how I cifs mount a shared "drive" on both my wife's Windows XP desktop and her Windows 7 laptop. Both have a separate "drive" that holds data. Both of those "drives" have the share name of "Data". Since we are the only two in this household and security is not an issue, both of those shares are set to allow "Everybody" with read and write access, so no user ID and password are required in this case.

The XP desktop machine has an IP address of 192.168.1.2 and the W7 laptop has an IP address of 192.168.1.4. I have created mount points for each.... /media/cortana and /media/alyx. (In F15, you should not use /media to setup any "permanent" mount points, use /mnt instead).

In the /etc/hosts file I have mapped those IP addresses to the respective computer (host) names, though you could use any name you like.
Code:
BASH:~/-> cat /etc/hosts
# hostname speedie.localdomain added to /etc/hosts by anaconda
127.0.0.1	speedie	localhost.localdomain	localhost	speedie.localdomain
::1	speedie	localhost6.localdomain6	localhost6	speedie.localdomain6
192.168.1.2	cortana2
192.168.1.4	alyx
Though I normally do this through a script that lets me choose which machine to access, the commands that do the actual mounting are:
Code:
mount.cifs //alyx/Data /media/alyx -o uid=500,gid=500,sec=none
mount.cifs //cortana2/Data /media/cortana -o uid=500,gid=500,sec=none
The mount point directories /media/cortana and /media/alyx are owned by my regular user (since I'm the only user on this machine) so permissions are not an issue. You can just use the IP address directly rather than define a hostname in the mount.cifs command (or "mount -t cifs" which does the same thing).

The "mount.cifs" and "umount.cifs" commands I use are actually older ones that allowed them be setUID, which allows me to run my mount script as a regular user and not root. That feature was taken away somewhere mid-life of F12.

For convenience, I also placed these entries in /etc/fstab:
Code:
//cortana/Data		/media/cortana		cifs	uid=500,gid=500,noauto,credentials=/home/paulm/.secret 0 0
//cortana2/Data		/media/cortana		cifs	uid=500,gid=500,noauto,sec=none 0 0
//alyx/Data		/media/alyx		cifs	uid=500,gid=500,noauto,sec=none 0 0
That allows me to do a quick and dirty:
Code:
sudo mount /media/alyx
without calling up the script. Hope this gives you some clue as to how to proceed from here. You don't need to make things as detailed and involved as I've described here, but you do need to do three basic things at a minimum.

1) create the share(s) on the Windows machine(s)

2) sudo mkdir /mnt/some_name

3) sudo mount.cifs //IPaddress/sharename /mnt/some_name
Thanks, this works perfect, but I have three questions.
1) I couldn't get the quick and dirty way to work, I could write a script that I could load everytime I need it, but I'm curious on how to get that way to work.
2) It seems that when it's mounted, when I try to turn off my laptop, it doesn't turn off, at least for as long as I waited. It just shows the Fedora logo and it's stuck there. Usually my laptop turns off in a few seconds, but I waited a few minutes and it doesn't turn off. I'm guessing I'm suppose to unmount it? But I don't know how.
3) I have a SSD in my laptop, would that affect the drive? I remember reading something about SSD, and I could be remembering this wrong, but don't SSD have a limited write/rewrite before it dies, would it affect it that way?
Thank you
Reply With Quote
  #12  
Old 15th July 2011, 06:32 PM
PabloTwo's Avatar
PabloTwo Offline
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,128
linuxfirefox
Re: Connect to Windows PC on Network

Quote:
Originally Posted by vdn20
1) I couldn't get the quick and dirty way to work, I could write a script that I could load everytime I need it, but I'm curious on how to get that way to work.
What about it didn't work? What error message do you get in the terminal? Without knowing precisely how you set that up, and what command you used, I don't know why it didn't work for you.

Post the lines you added to your /etc/hosts and /etc/fstab files and the mount command you used to try the "quick and dirty" way. Were you using "sudo" without having your regular user added to the suders file? AFAIK, F15 doesn't automatically add usres to the /etc/sudoers file.

I'm not sure about the shutdown hangup. Maybe it's stalling trying to unmount the Windows share(s) you mounted. Have you tried unmounting it/them manually before shutting down to see if that cures the shutdown delay/hang?

I'm not the guy to ask about SSD drives. Others on the forum are more knowledgeable on that issue and can probably advise better.

---------- Post added at 01:32 PM ---------- Previous post was at 01:07 PM ----------

Another thought here... If your LAN is connected via router (most likely), chances are good the router is set to use dynamic DHCP and the NIC's in your computers are as well. That means that each time you shut down all computers on the LAN and then reboot them, there is no guarantee which computer will receive which IP address.

Hard coding the IP address's for each machine in the /etc/hosts file can then be a problem. I resolve that on my system by using a feature of the router called "Address Reservation" in the LAN setup section of the router. Doing this, the machines on my LAN always receive the same IP address.
Reply With Quote
  #13  
Old 15th July 2011, 06:39 PM
vdn20 Offline
Registered User
 
Join Date: Apr 2011
Posts: 9
linuxchrome
Re: Connect to Windows PC on Network

Quote:
Originally Posted by PabloTwo View Post
What about it didn't work? What error message do you get in the terminal? Without knowing precisely how you set that up, and what command you used, I don't know why it didn't work for you.

Post the lines you added to your /etc/hosts and /etc/fstab files and the mount command you used to try the "quick and dirty" way. Were you using "sudo" without having your regular user added to the suders file? AFAIK, F15 doesn't automatically add usres to the /etc/sudoers file.

I'm not sure about the shutdown hangup. Maybe it's stalling trying to unmount the Windows share(s) you mounted. Have you tried unmounting it/them manually before shutting down to see if that cures the shutdown delay/hang?

I'm not the guy to ask about SSD drives. Others on the forum are more knowledgeable on that issue and can probably advise better.
Okay, never mind, I got it all to work. I must have done something wrong but I don't know what. I just wrote a script and run it when I need to, but thanks for the 'quick and dirty' way though, it'll come in handy. And you were right about the unmounting. I had assumed that the command was unmount, it logically made sense, but I looked it up and it was umount. Also, can you help me understand these lines you wrote earlier so I can modify them to suit my needs as need? It's the
-o uid=500,gid=500,sec=none
and
uid=500,gid=500,noauto,credentials=/home/paulm/.secret 0 0

Thanks
Reply With Quote
  #14  
Old 15th July 2011, 07:18 PM
PabloTwo's Avatar
PabloTwo Offline
"Registered User" T-Shirt Winner
 
Join Date: Mar 2007
Location: Seville, FL
Posts: 5,128
linuxfirefox
Re: Connect to Windows PC on Network

Everything after the "-o" on the mount command line or after the file system type entry in the fstab file (using the comma "," as a separator) are options to the mount command.

uid sets the OWNER
gid sets the GROUP

Both of the above can be specified by either username or ID number. By default, the first regular user created on a Linux system is assigned a User ID of 500. The next user created would get assigned User ID 501, etc. Ditto for Group ID. In Fedora, when you create a user, it automatically creates a GROUP of the same name/ID number.

If you used UID=500,GID=500 as options, then you should actaully be User 500. I am user 500 on my system.
Code:
BASH:~/-> id | awk '{print $1 " " $2}'
uid=500(paulm) gid=500(paulm)
The "noauto" option in the fstab file tell the system not to try to automount that filesystem at bootup. If the noauto option is absent, it will try to mount it during bootup. If that filesystem isn't available (other computer is turned off), it will waste several seconds trying before moving on.

credentials=blah blah blah
This points to a file that holds the UserID and password needed for logon to that machine (which is W2K, but rarely is ever booted into these days). You can learn more about the options to the mount command by doing:
Code:
man mount
Yes, I still catch myself typing "unmount" instead of "umount" quite a bit.

---------- Post added at 02:18 PM ---------- Previous post was at 01:58 PM ----------

And back to the "hanging up at shutdown" problem. Say I do a cifs mount of my wifes W7 laptop to grab a file or two from that machine (she would be out in the living room where I can't see her), then, before I umount her laptop shared directory, she shuts down. Then, when I go to shutdown Fedora, it will hang up for about 3-4 minutes trying to do a graceful dismount of that mounted share, which of course, it can't do.

If her laptop is still up and running and I haven't done a manual umount and I shutdown, there is no problem. The normal shutdown process will dismount it in a matter of a second or two at most.
Reply With Quote
  #15  
Old 15th July 2011, 07:28 PM
vdn20 Offline
Registered User
 
Join Date: Apr 2011
Posts: 9
linuxchrome
Re: Connect to Windows PC on Network

Quote:
Originally Posted by PabloTwo View Post
And back to the "hanging up at shutdown" problem. Say I do a cifs mount of my wifes W7 laptop to grab a file or two from that machine (she would be out in the living room where I can't see her), then, before I umount her laptop shared directory, she shuts down. Then, when I go to shutdown Fedora, it will hang up for about 3-4 minutes trying to do a graceful dismount of that mounted share, which of course, it can't do.

If her laptop is still up and running and I haven't done a manual umount and I shutdown, there is no problem. The normal shutdown process will dismount it in a matter of a second or two at most.
I was testing it with my desktop, which is usually almost always on. When I was trying to turn off my laptop while my desktop was on, it was hanging up at shutdown. If I unmount it, there's no problem. It's difference from what you have, but for the most part, I have it working. Thanks for all the help

Also, is there a way to set it up so a user needs a password to get into a specific shared folder? Is that done on the Windows side or linux side?

Last edited by vdn20; 15th July 2011 at 08:54 PM.
Reply With Quote
Reply

Tags
connect, network, windows

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot get Places>network to connect to my windows shares sportflyer Servers & Networking 0 15th April 2010 10:47 PM
unable to connect to internet,able to connect through windows XP Narasimha Servers & Networking 1 4th October 2005 12:16 AM
unable to connect to internet,able to connect through windows XP Narasimha Servers & Networking 0 3rd October 2005 06:35 PM


Current GMT-time: 10:50 (Saturday, 25-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat