Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 07-26-2006, 01:35 PM   #1
Registered: May 2004
Location: Atlanta, GA USA
Distribution: Redhat ES4, FC4, FC5, slax, ubuntu, knoppix
Posts: 155

Rep: Reputation: 30
Question 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.


Last edited by lucktsm; 07-26-2006 at 01:42 PM.
Old 07-26-2006, 04:06 PM   #2
Senior Member
Registered: Mar 2004
Location: Wales, UK
Distribution: Debian, Ubuntu
Posts: 1,075

Rep: Reputation: 45
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.
Old 07-26-2006, 04:08 PM   #3
Registered: May 2004
Location: Atlanta, GA USA
Distribution: Redhat ES4, FC4, FC5, slax, ubuntu, knoppix
Posts: 155

Original Poster
Rep: Reputation: 30
I like the idea of doing reserved IP addresses. I am only looking at 10 machines. Thanks for the info.


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
ping netbios names from linux (samba) HadroLepton Linux - Networking 25 03-23-2016 04:31 PM
2 nic's = 2 netbios names wanted! pingu Linux - Networking 2 11-11-2005 01:49 AM
NetBIOS names not resolving Xhalman Linux - Networking 0 02-16-2004 02:38 PM
Weird Netbios Names RWild Linux - Networking 4 01-04-2003 10:09 AM
samba NetBIOS names problem dkodegwc Linux - Networking 10 12-10-2002 12:32 AM > Forums > Linux Forums > Linux - Software

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

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