LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-12-2006, 04:40 PM   #1
john0000
LQ Newbie
 
Registered: May 2003
Location: Allentown, PA
Distribution: Red Hat Linux 9
Posts: 6

Rep: Reputation: 0
Symbolic link to Windows mshome path


I have a WindowsXP machine containing most of my programming tools, and a laptop with the latest version of Fedora. Source code is on my XP machine in the workgroup "MSHOME". What I would like to do is create a symbolic link on the Linux machine (ln -s) to the directory on the Windows machine that contains the code, so that I can continue to edit it on the XP machine but compile it on the Linux machine.

I tried looking this stuff up, found some advice using smbfs, and found out that Fedora uses cifs, which doesn't like the workgroup name. I'm using DHCP, so specifying IP is inconvenient.

Thanks in advance.
 
Old 12-12-2006, 05:53 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 64
Have you mounted the share from the windows machine?
Then you should be able to use the ln command to the mounted directory.
It may be better to just create a share of the directory itself.

Brian
 
Old 12-13-2006, 08:44 AM   #3
john0000
LQ Newbie
 
Registered: May 2003
Location: Allentown, PA
Distribution: Red Hat Linux 9
Posts: 6

Original Poster
Rep: Reputation: 0
When mounting, I have to use the CIFS file system. It requires specification of the address of my PC, and it doesn't accept Samba addresses. How can I specify the address of the WinXP machine without specifying the IP address (which will vary due to VNC)?

Thank you.
 
Old 12-13-2006, 12:33 PM   #4
john0000
LQ Newbie
 
Registered: May 2003
Location: Allentown, PA
Distribution: Red Hat Linux 9
Posts: 6

Original Poster
Rep: Reputation: 0
In particular, using the CIFS file system, what would the mount command-line look like if I wish to mount the directory at mshome/hppav/c/work/source/.

Thank you!
 
Old 12-13-2006, 05:48 PM   #5
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 64
Is the dhcp server a linux machine or a store bought router?

Brian
 
Old 12-13-2006, 09:51 PM   #6
kenji
Member
 
Registered: Sep 2004
Location: Philippines
Distribution: Slackware
Posts: 143

Rep: Reputation: 16
have you tried mounting it and editing /etc/fstab
so that the fstab will auto mount it at startup
hope this helps| 3

Last edited by kenji; 12-13-2006 at 10:04 PM.
 
Old 12-14-2006, 12:30 AM   #7
john0000
LQ Newbie
 
Registered: May 2003
Location: Allentown, PA
Distribution: Red Hat Linux 9
Posts: 6

Original Poster
Rep: Reputation: 0
The DHCP server is a Linksys router. Thank you for the tip on auto-mounting, thus far however I haven't been able to get the mount command to work.

Is there something about the Windows workgroup that makes it difficult for the mount command to find it?

Thanks in advance!
 
Old 12-14-2006, 03:42 AM   #8
kenji
Member
 
Registered: Sep 2004
Location: Philippines
Distribution: Slackware
Posts: 143

Rep: Reputation: 16
try this. hope this helps|3

mount -t smbfs -o username=username //hostname/mount_folder /folder

editing fstab

#
# /etc/fstab
#
# <device> <mountpoint> <filesystemtype><options> <dump> <fsckorder>

/dev/hdb5 / ext2 defaults 1 1
/dev/hdb2 /home ext2 defaults 1 2
/dev/hdc /mnt/cdrom iso9660 noauto,ro,user 0 0
/dev/hda1 /mnt/dos/c msdos defaults 0 0
/dev/hdb1 /mnt/dos/d msdos defaults 0 0
/dev/fd0 /mnt/floppy ext2 noauto,user 0 0
/dev/hdb4 none ignore defaults 0 0

none /proc proc defaults
/dev/hdb3 none swap sw

# Windows Share
//hostname/mount_folder /folder vfat defaults 0 0

Last edited by kenji; 12-14-2006 at 03:54 AM.
 
Old 12-14-2006, 06:54 AM   #9
john0000
LQ Newbie
 
Registered: May 2003
Location: Allentown, PA
Distribution: Red Hat Linux 9
Posts: 6

Original Poster
Rep: Reputation: 0
Thank you - this is mounting with smbfs, which apparently works under other Linux flavors, but Fedora (apparently) doesn't provide smbfs so I have to use cifs. I haven't figured out how to specify the path to the target machine with cifs.
 
Old 12-14-2006, 05:36 PM   #10
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 64
You should be able to mount using workgroup and share names. There are some links in google search mention Fedora leaves some of the support to use share names with cifs. smbfs should be present in the default fedora kernel.

But the big issue is you cannot use the share name unless you have it mapped to an IP in your /etc/hosts file. Since you can only use DHCP to get an IP and not use a static IP then this will not work for you.

I have not seen any scripts out there to generate a fresh hosts file every so often. What I think it would involve is using nmap to search a certain range of IPs. Take that data and use the smbclient program to generate a list of shares and machine names with IPs. From there take the data from smbclient compare it to a second data file with the share names and when the sharename from the smbclient data matches from the list data file. One can then generate a updated /etc/hosts file. You can then add a cron timetable to run the app every so often to keep up dated but will start to become a mess between other machine reboots and shares that are already mounted. If you managed this then one should unmount all shares and then reboot other machines.

No really easy way I know of like Windows does to list shares it finds.

When mention the dhcp I was hoping for a linux dhcp server. You can have it check with a list of mac addresses so when a machine tries to contact the dhcp server it will always be giving a certain IP. From that you can have a static /etc/hosts file. You can always disable the DHCP on the router and run a DHCP server on the Linux box if you wish.

Brian
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
absolute path from symbolic link vishalbutte Programming 1 01-16-2006 02:13 AM
symbolic link to the realplay script is in your PATH Baracuda Linux - Software 1 10-03-2005 03:31 AM
Does windows XP have something like symbolic link? hkl8324 General 4 06-27-2005 11:08 PM
symbolic link ilnli Slackware 6 01-04-2005 06:05 PM
how do I hook up to a windows workgroup such as the generic MSHOME with fedora core 1 pitts68 Linux - Newbie 5 10-25-2004 08:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration