-   Linux - Software (
-   -   Trying to script a cifs connection using netbios names (

lucktsm 07-26-2006 01:35 PM

Trying to script a cifs connection using netbios names
Hi all,

I have an purplexing question:

I am trying to script a samba domain controller to connect to the various Windows machines and backup data. The problem is I don't know the ip address of the machines, because they are DHCP. I have the machine names and can do an nblookup on them.

How can I script this mount command while using the IP address coming from the nblookup?

I would greatly appreciate any feedback.


hob 07-26-2006 04:06 PM

Looking at the man page for "net", the command "lookup" function looks like it will get NetBIOS names for a specified IP address.

Having said that... Ideally, you should configure your DHCP server to assign the same IP addresses to the same MAC addresses each time (this is called "reserving"). If you don't then anything that relies on IP addresses will hit this kind of issue.

Also bear in mind that what you've described will automatically fail if the Windows systems are off, crashed, etc. So it may be better in this case to have scripts on the Windows systems initiate the copying. YMMV.

lucktsm 07-26-2006 04:08 PM

I like the idea of doing reserved IP addresses. I am only looking at 10 machines. Thanks for the info.

All times are GMT -5. The time now is 02:11 PM.