<---- template headericclude ----->
FIle Share on Windows
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 4 of 4
  1. #1
    carlwill Guest

    FIle Share on Windows

    This is my last Linux project before I am 100% happy in Linux, besides lack of games but none the less. I have a Windows XP machine on my Lan (192.168.1.103). This XP machine name is winux (it's a un-original dual boot name) & it has all my files, videos, and mp3's on it.

    My main machine in my office is Fedora Core 3 (192.168.1.101). I was told that on this machine, I need to edit /etc/fstab, which happens to look like this.

    Code:
    # This file is edited by fstab-sync - see 'man fstab-sync' for details
    /dev/VolGroup00/LogVol00 /                       ext3    defaults        1 1
    LABEL=/boot             /boot                   ext3    defaults        1 2
    none                    /dev/pts                devpts  gid=5,mode=620  0 0
    none                    /dev/shm                tmpfs   defaults        0 0
    none                    /proc                   proc    defaults        0 0
    none                    /sys                    sysfs   defaults        0 0
    /dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0
    /dev/hdc                /media/cdrecorder       auto    pamconsole,exec,noauto,fscontext=system_u:object_r:removable_t,managed 0 0
    I have made a share dir called share in the /mnt dir. mkdir /mnt/share

    I read the FAQ and it says I need to add a line in the above file like so:

    //server/share /mnt/share cifs exec, credentials=/etc/cifspw,uid=carlos

    (I don't know if the //server needs to be the windows server name (winux) and the /share needs to be the share folder name on the windows machine (share)?

    Then I create a file called cifspw and saved that in /etc (saved as /etc/cifspw)

    username=mywindowsusername
    password=mywindowspassword

    Can someone comment on my steps in mounting this windows file share?

  2. #2
    jayemef Guest
    The first part is what you are trying to access, and the second is where you want to mount it. So for the first part, you would want it to read //winux/windows_shared directory. The second would be /mnt/share. So your line should read something like
    //winux/windows_shared_directory /mnt/share cifs credentials=/etc/cifspw,uid=carlos 0 0

    I don't think you need the exec in there. Keep a close eye on whitespace though, as that's how fstab differentiates between the sections. I use tab to keep it all clear and aligned.

    Finally, I would suggest running as root
    Code:
    chmod 600 /etc/cifspw
    This will change the permissions on your credentials file so that only root can view it. That way others can't come on your machine and find your passwords.

    If you fstab works, you should be able to mount your windows directory with the command
    Code:
    mount /mnt/share
    If it doesn't work, you can always use the long way:
    Code:
    mount -t cifs //winux/shared_directory_name /mnt/share -o user=your_windows_username
    Last edited by jayemef; 3rd February 2005 at 11:04 PM.

  3. #3
    carlwill Guest
    ok, so now my /etc/fstab dir looks like this...

    Code:
    # This file is edited by fstab-sync - see 'man fstab-sync' for details
    /dev/VolGroup00/LogVol00 /                       ext3    defaults        1 1
    LABEL=/boot             /boot                   ext3    defaults        1 2
    none                    /dev/pts                devpts  gid=5,mode=620  0 0
    none                    /dev/shm                tmpfs   defaults        0 0
    none                    /proc                   proc    defaults        0 0
    none                    /sys                    sysfs   defaults        0 0
    /dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0
    //winux/share /mnt/share cifs credentials=/etc/cifspw,uid=carlos   	0 0
    
    
    /dev/hdc                /media/cdrecorder       auto    pamconsole,exec,noauto,fscontext=system_u:object_r:removable_t,managed 0 0
    I also changed the permissions of the cifspw file like you suggested, I just hope that does not cause a conflict when trying to access the share since it has a restrictive persmission to access the file. I can't test these settings untill I get my new CPOU fan for this Windows machine I am trying to mount but if I have issues, I will be back.

    Thanks for your help and if anyone else would like to comment on anything I did, please do so.

  4. #4
    jayemef Guest
    Cool, good luck with it. One word of caution though: I have seen several reports of cifs auto-mounting causing boot time lock-up (and a possible solution going to the graphical boot sequence and pressing enter if it does). I personally always leave my stuff commented out, and just uncomment them when needed (and for the common stuff, I actually wrote scripts and aliased them with commands to mount them quickly and easily). I would recommend testing with the mount /mnt/share command before actually attempting to auto-mount with bootup.

    As for the permissions with /etc/cifspw, don't worry. It won't effect anything on the windows side. It just prevents others from getting onto the linux machine and checking the file. Mount will be the only thing reading it, and you need to be root to mount files anyway.
    Last edited by jayemef; 4th February 2005 at 10:17 PM.

Similar Threads

  1. mount windows share to share it
    By Dors in forum Using Fedora
    Replies: 3
    Last Post: 21st August 2008, 02:04 AM
  2. Replies: 1
    Last Post: 25th November 2005, 03:31 PM
  3. Vsftp & Windows File Share
    By sireone in forum Servers & Networking
    Replies: 0
    Last Post: 19th October 2005, 02:48 AM
  4. Windows Share
    By WhiteTree in forum Servers & Networking
    Replies: 1
    Last Post: 9th May 2005, 08:41 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
[[template footer(Guest)]]