Tiny Core Linux

Tiny Core Extensions => TCE Q&A Forum => Topic started by: peliot on September 16, 2009, 04:17:55 PM

Title: Connecting to windows shares with name rather than IP address?
Post by: peliot on September 16, 2009, 04:17:55 PM
Hi,
 Is it possible with TCL to mount a windows fileshare by name (e.g. "mount -t cifs //xyz-fileserver/foldername..." as opposed to "mount -t cifs //192.168.1.1/foldername...")? I have installed the filesystems extension, but mounting by name does not seem to work. I'm working in an environment where IP addresses change, while names are fixed, so working by name would be preferable.

I had a similar problem once with an Ubuntu installation and installing smbfs package solved the problem, but I couldn't find an equivalent in TCL. If there isn't one, no worries, I just thought I'd ask in case I was missing something that would make my life easier.

Thanks,
Pete
Title: changing IP address
Post by: JoXo009 on September 16, 2009, 05:28:10 PM
Quote
fileshare by name

I don't think that it's possible to replace the network IP by name.

But perhaps you can use a script which creates the needed IP dynamically.

First step: looking up the actual IP for example with ifconfig. (I don't use dynamic IPs, so perhaps somebody else could explain details.)

Second step: mounting the windows share with that IP.
Title: Re: Connecting to windows shares with name rather than IP address?
Post by: perthie on September 16, 2009, 07:51:11 PM
You could use nbtscan to scan your network for shares, then extract the IP address for the desired server. For example:

Code: [Select]
IP=`nbtscan 192.168.2.0/24 | grep $SERVER | cut  -d " " -f 1`
sudo mount -t cifs //$IP/sharedfolder  myfolder  -o user=xxx

Nbtscan is simple to compile - just ./configure and make
Title: Re: Connecting to windows shares with name rather than IP address?
Post by: bmarkus on September 17, 2009, 01:29:00 AM

Nbtscan is simple to compile - just ./configure and make


What is wrong with nbtscan already available in the repo?
Title: Re: Connecting to windows shares with name rather than IP address?
Post by: curaga on September 25, 2009, 02:59:18 PM
smbfs - we have a Samba extension, it should include that functionality.