[linux-cifs-client] Re: Identify a hos

Steve French (smfltc) smfltc at us.ibm.com
Mon May 14 15:29:32 GMT 2007


linux-cifs-client-request at lists.samba.org wrote:

>I'm trying to implement cifs instead of smbmount. I'm using SuSE 10.2
>on the client machine and 10.0 on the server.
>
>As I understand it from the manual, if I have mount.cifs installed
>(which I have), I should be able to specify a host name instead of an
>ipaddress when specifying a share name. However, I find that, if I
>don't specify the share name, the mount command can't find the host.
>
>The host is visible via network manager, smbclient, etc. So what should
>I do to do a cifs mount that I'm not doing?
>
>The workaround, I know, is simple. I should include the ipaddress in the
>various scripts which attempt to mount the share. Unfortunately,
>there's more than one particular share that can be mounted on more than
>one host. And there's more than one reason to mount a share, which
>means more than one script.
>
>And then there's the fact that the the ip address is given by the
>router, so it may change if I make changes to the configuration. Which
>will mean changing every script if it happens.
>
>So you understand why I'd prefer to get the mount command to identify
>the host, if at all possible,
>  
>
To understand the cause of your problem we need more information, but 
the mount command
can of course identify the host by TCP name (DNS name)..

First though ... your terminology is unusual.   A share name is part of 
a UNC name
(ie Universal Naming Convention name).    It is preceded by the server 
name e.g. a TCP host name,
or IP address or in older clients an RFC1001 (netbios) name.   The share 
name is similar to
an NFS export in some ways - but in either case you also need to 
identify the server's ip address or
tcp name.

So mount syntax is typically as follows:

    mount -t cifs //tcp-name-of-server/share-name   
/local-directory-to-mount-over

e.g.
    mount -t cifs //myhost.mycity.rr.com/public   /mnt -o user=my-name

If you can not ping "myhost.mycity.rr.com" (or similarly "nslookup 
myhost.mycity.rr.com")
then the server name is not in DNS and you would need to configure your 
client to map
that name to the ip address of that system or add the system into your 
DNS or specify the
ip address on the mount.   If you can ping the server, and the share 
name exists
(you can use "smbclient -L //myhost.mycit.rr.com" to list the shares on 
the server)
then most connection problems have to do with security on the server 
(the user
does not exist for this domain with this password) or with firewall 
configuration
(blocking port 445 and port 139) - or for older servers (pre-Windows NT4)
you also need to specify the server's RFC1001 (netbios) name e.g. among the
mount options adding "servern=MYNETBIOSNAME"


More information about the linux-cifs-client mailing list