OpenWrt Forum Archive

Topic: can't use "net use ..." after hostname is changed

The content of this topic has been archived on 30 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

With no changes to the hostname, the default hostname shown in the Webif console is "OpenWrt"
I configured Samba with a share on "share" and i can use on a (dos)client the command "net use x: \\openwrt\share" to connect to the sharedrive.

But when i change the wan_hostname and/or the lan_hostname (nvram) i cannot connect to the share at all. 
There is no host found with the command "net view"

I need to set up the hostname for the wan interface for my cable-internet

Where does it go wrong?

(Last edited by berend on 9 Jul 2007, 00:49)

As far as I know the nvram variable "lan_hostname" is not used by OpenWRT. Therefor I am guessing the problem is in the hostname you set in smb.conf.  See if this is set to your current hostname (wan_hostname). You could insert the variable %h (=case sensitive) in your smb.conf file at the position of the hostname to automatically set it to the correct one. An example for a setup with the dutch internet provider @home which requires you to set hostname would be "\\CP408110-A\share"

Ok, the problem was indeed the use of wan_hostname and lan_hostname.

My wan interface is called vlan1.

I setup the router (for @home):

nvram set wan_ifname=vlan1 (for my wl500gx)
nvram set wan_proto=dhcp
nvram set vlan1_hostname=cc123456-a
nvram commit

now it works!

Bedankt!

(Last edited by berend on 11 Jul 2007, 23:29)

The discussion might have continued from here.