Obsolete Releases > SME 8.x Contribs

affa wins/smbfs/cifs name resolution

(1/2) > >>

gklaus:
After upgrading to sme version 8, the affa backup jobs pulling data from workstations to the backup server failed. The reason had to do with smb/cifs name resolution and is easily fixed: add 'wins' to the 'hosts:'-line in nsswitch.conf. Those interested please find details below.

Initially, backup jobs failed with this report:

Mon_Jun__4_17:30:01[27802]:_Mounting_//WINXP-ID/c$_to_/mnt/id
Mon_Jun__4_17:30:01[27802]:_Exec_Out:_mount:_unknown_filesystem_type_'smbfs'

The reason was that smbmount is no longer available. Switching to cifs...

db affa setprop id AutomountOptions '-t smbfs -o credentials=...'
to
db affa setprop id AutomountOptions '-t cifs -o credentials=...'

...brought back the old problem that netbios names were not resolved and (fixed) IP-addresses needed:

Mon_Jun__4_19:38:32[30025]:_Mounting_//WINXP-ID/c$_to_/mnt/id
Mon_Jun__4_19:38:32[30025]:_Exec_Out:_mount_error:_could_not_resolve_address_for_WINXP-ID:_Name_or_service_not_known
Mon_Jun__4_19:38:32[30025]:_Exec_Out:_No_ip_address_specified_and_hostname_not_found

Reading a couple of bug reports on related issues taught me that sme server resolves hostnames by consulting the hosts file and dns but not wins. Editing /etc/nsswitch.conf...

hosts:       files dns
to
hosts:       files dns wins

...solves the problem.

Hope this might help someone.

Do you think reporting a bug to ask to add wins name resolution to the default configuration would be a good idea? I myself found it confusing that “ping 'netbios-name'” works on the workstations but not on the server, even though the server 'sees' the workstations' netbios names when the smbtree command is used.

chris burnat:

--- Quote from: gklaus on June 14, 2012, 12:36:23 PM ---
Hope this might help someone.

--- End quote ---
I certainly will, thanks.


--- Quote ---Do you think reporting a bug to ask to add wins name resolution to the default configuration would be a good idea? I myself found it confusing that “ping 'netbios-name'” works on the workstations but not on the server, even though the server 'sees' the workstations' netbios names when the smbtree command is used.

--- End quote ---

Affa is no longer supported, no maintainer on board.  However, It may not always be so, and your input should really be with the rest of the post about Affa on the Bugtracker.  In this way, a future maintainer (wishing...) will find this information easily. When opening a bug, ensure that you place it under 8.xx contribs section, and provide all information, not just a link to the Forums.
Thanks.

gklaus:
Thanks for the response. It's on the bug tracker now (no. 7013).

gklaus:
Just discovered that, unfortunately, the solution is a bit more complicated:

- The file /etc/nsswitch.conf is overwritten each time an update is performed and the post-upgrade event is signaled.

- If the inclusion of wins in the name resolution shall persist updates, a custom template for the nsswitch.conf file must be created, so that the actual nsswitch.conf file is recreated in the intended way during each update. (Simply editing the template will not be sufficient since the tamplates may be updated from time to time with new default versions -- according the manual).

- Create a new directory nsswitch.conf for the template in the template custom branch at /etc/e-smith/templates-custom/etc/

- Copy the template file /etc/e-smith/templates/etc/nsswitch.conf/10files to the CUSTOM branch's new directory /etc/e-smith/templates-custom/etc/nsswitch.conf/

- Edit the newly copied custom template /etc/e-smith/templates-custom/etc/nsswitch.conf/10files:

change the line

hosts:    { ($AccessType eq "off") ? "files" : "files dns" }
to
hosts:    { ($AccessType eq "off") ? "files" : "files dns wins" }

- Use signal-event post-upgrade and signal-event reboot to have the new custom template rewrite the nsswitch.conf

This solution seems to work (for now...  :-)), but I am not at all familiar with the sme-server's template and database system, so please correct the above if necessary.

chris burnat:

--- Quote from: gklaus on June 28, 2012, 06:45:20 PM ---Just discovered that, unfortunately, the solution is a bit more complicated:

--- End quote ---

Please follow up  at Bugzilla: http://bugs.contribs.org/show_bug.cgi?id=7013
Posting here and there may lead to confusion.
Thanks.

Navigation

[0] Message Index

[#] Next page

Go to full version