
NetBiosInfoGet function change
Cool. I actually did something else that works as well
Since I am using a windows 2000 DNS server which forwards lookups to my WINS
server, I just setup all of my clients as non-dhcp since the dns server
looks up computer names from the wins server. So to backuppc, they look
like static hosts because they are always pingable.
Every computer registers itself with the wins server on bootup.
Any comments on this? I think this should be OK.
Leon
-----Original Message-----
From: Craig Barratt [mailto:craig < at > atheros.com]
Sent: Saturday, July 13, 2002 8:53 PM
To: Leon Letto
Cc: backuppc-users < at > lists.sourceforge.net
Subject: Re: [BackupPC-users] NetBiosInfoGet function change
I have a suggestion for a change to the NetBiosInfoGet function to enable
backing up Win95 Computers.
This line;
foreach ( split(/[\n\r]+/, `$self->{Conf}{NmbLookupPath} -A $host 2>&1`)
)
{
Should be changed to;
foreach ( split(/[\n\r]+/, `$self->{Conf}{NmbLookupPath} -Ar $host 2>&1`)
)
{
Using Ar allows nmblookup to work with Win95 computers and I don't think
it
breaks compatibility with newer versions of Windows (NT/2000/XP).
One Problem, I don't know how to get this change incorporated as when I
change the lib.pm file, it still doesn't recognize the Win95 computer even
though it works from the command line. I restarted the backuppc service
as
well as rebooting the server to no avail.
From the nmblookup man page, the -r option only works for root since it
binds to port 137 (a priviliged port). So I presume when BackupPC runs
the command it fails. For this reason I can't make this the default.
You have a few choices (from more desirable to least desirable):
- Make the Win95 machine fixed IP (rather than dhcp or dynamic)
and make sure that $Conf{FixedIPNetBiosNameCheck} is off (which
is the default). Then nmblookup should not be used for that
host.
- Make nmblookup setuid to root (owned by root and u+s mode)
and use the -r option that you suggested. I don't know the
security risks here. But you could make this safer by
putting the setuid nmblookup into a directory that only
BackupPC has access to (eg, 0500 permissions and owned by
BackupPC), and adjust $Conf{NmbLookupPath} accordingly. That
way no regular users can run the setuid nmblookup.
- Make BackupPC run as root. Not recommended.
I have been meaning to move the nmblookup and smbclient commands
to the config file (like it's done already for ping and tar), so
you can make changes to these commands on a site or host basis.
I'm wondering whether I should sneak it into v1.5.0 or save it
for the next version...
Craig
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
BackupPC-users mailing list
BackupPC-users < at > lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/backuppc-users