mounting samba share and finding samba ip in linux
Aug.27, 2009 in
Think Linux, Think Software, Think Technology
following the samba/nfs post – http://www.azhowto.com/2009/08/07/mounting-file-systems-and-autofs-tips/ earlier, what if we do not know the ip address of the samba server?
if you just have the samba server name say ri-fnp, smbclient can find it easily for you, just do
smbclient //ri-fnp/backup -U user -W MYDOMAIN
If you want to mount it, you will need to know the ip address. “findsmb” is useful
findsmb
If the hostname does not appear, need to do a nmblookup, ie
nmblookup ri-fnp
This usually works. Say it resolves to 10.2.115.11, now mount it as you would in fstab
//10.2.115.11/backup /mnt cifsĀ domain=MYDOMAIN,user=xxx,password=xxx 0 0
or if you don’t require it to be persistent, just mount it once in command line
mount -t cifs -o domain=MYDOMAIN,user=xxx,password=xxx //10.2.115.11/backup /mnt












Leave a Reply