LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-06-2009, 04:44 PM   #1
miros84
Member
 
Registered: Aug 2009
Location: Spain
Distribution: Debian stable, squeeze
Posts: 501

Rep: Reputation: 31
Mount with name instead of IP?


Hello
TO mount some folder I use that

Code:
mount -t cifs //192.168.0.192/newexpbackup /mnt/newexpbackup
But my IP 192.168.0.192 changes, so I want to mount with name of the computer.
It is possible? What I need?
 
Old 09-06-2009, 04:49 PM   #2
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
you can just use the 'name' of the machine. in some terminals, the prompt may look like "myusername@myhostname: ", the "myhostname" would be the computer "name", and you can use this in place of any IP address that this machine corresponds to. this applies to communication within this single LAN, of course.

alternatively, you could find the computer name by running "uname -n"
 
Old 09-06-2009, 05:00 PM   #3
Elv13
Member
 
Registered: Apr 2006
Location: Montreal,Quebec
Distribution: Gentoo
Posts: 825

Rep: Reputation: 129Reputation: 129
Hostname worked fine with smbfs before, but does not work that fine anymore. Does the "smbtree"
command work on your system? If it does not, it is your problem, not the mount command.
 
Old 09-06-2009, 07:06 PM   #4
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,194

Rep: Reputation: 1040Reputation: 1040Reputation: 1040Reputation: 1040Reputation: 1040Reputation: 1040Reputation: 1040Reputation: 1040
In addition, you need to have a servername which resolves correctly by DNS lookup. With smb I was able to connect to //cserv/myshare, since I am using cifs it is //cserv.mydomain.com/myshare.

In other words, if you ping yourhost.yourdomain.com a valid email address should be returned by your DNS.

jlinkels
 
Old 09-07-2009, 11:03 AM   #5
miros84
Member
 
Registered: Aug 2009
Location: Spain
Distribution: Debian stable, squeeze
Posts: 501

Original Poster
Rep: Reputation: 31
I found that.

What do you think. I think to test it.

Quote:
1) Edit /etc/nsswitch.conf, 2) Find the line starting "hosts:", 3) Edit the line so instead of saying "files mdns4_minimal" (etc) it says "files wins mdns4_minimal" (etc). Finally, type sudo aptitude install winbind and it should work with just computer names.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NFS mount of smb mount of windows share: permission denied problem :( Bagatur Linux - Networking 4 07-07-2009 11:34 AM
when i mount my USB Flash Drive A Messenge has come that mount: can't find /dev/sda/h feda82 Red Hat 2 12-24-2005 07:16 AM
when i mount my USB Flash Drive A Messenge has come that mount: can't find /dev/sda/h feda82 Red Hat 1 12-24-2005 04:25 AM
when i mount my USB Flash Drive A Messenge has come that mount: can't find /dev/sda/h feda82 Red Hat 2 12-24-2005 02:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 08:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration