LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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-03-2009, 12:03 PM   #1
miros84
Member
 
Registered: Aug 2009
Location: Spain
Distribution: Debian stable, squeeze
Posts: 501

Rep: Reputation: 31
How to mount folder in network with samba?


Hello
I have home network.
Pc1 and Pc2. I can access from Pc1 to Pc2 and from Pc2 to Pc1. The network es OK
What I want is to copy folder from bash. So, I see that I cannot copy in bash using smb:///
I need to mount my remote folder in mnt?
How can I mount them?
Example, my remote PC hostname is mito-test and when I go to network and then I enter in miro-test I have a folder named: www
In nautilius the direction is: smb://miro-test/www
but in bash I cannot use it.
I tried this way:
Code:
 mount -t smbfs //MIRO-TEST/www /mnt/www
but no luck
I get this error
Code:
mount error: could not find target server. TCP name MIRO-TEST/www not found
No ip address specified and hostname not found
Any help?
 
Old 09-03-2009, 04:54 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You can use nmblookup to find the IP of your box
Code:
nmblookup 'MIRO-TEST'
and then use:
Code:
mount -t cifs //x.x.x.x/www /mnt/www
Note that I've used cifs and not smbfs, because smbfs is deprecated.

Regards
 
Old 09-04-2009, 07:57 AM   #3
miros84
Member
 
Registered: Aug 2009
Location: Spain
Distribution: Debian stable, squeeze
Posts: 501

Original Poster
Rep: Reputation: 31
Hello
Thank you for helping. Can you tell me where to put this command, so when I restart, I dont need to mount again?
 
Old 09-04-2009, 08:04 AM   #4
jimjones
Member
 
Registered: May 2005
Location: Belgium
Distribution: slackware 10.2
Posts: 43

Rep: Reputation: 15
that would go in /etc/fstab

just add a line
/ip/share /mountpoint filetype options
 
Old 09-04-2009, 08:10 AM   #5
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

As jimjones said above you should add an entry in /etc/fstab. In your case
Code:
//x.x.x.x/www    /mnt/www    cifs    rw    0 0
 
Old 09-04-2009, 08:43 AM   #6
miros84
Member
 
Registered: Aug 2009
Location: Spain
Distribution: Debian stable, squeeze
Posts: 501

Original Poster
Rep: Reputation: 31
I tried to mount ntfs partitions, and I didnot could. It is the same way?
I got this error
Code:
 missing codepage or helper program, or other error
       (for several filesystems (e.g. nfs, cifs) you might
       need a /sbin/mount.<type> helper program)

Last edited by miros84; 09-04-2009 at 08:46 AM.
 
Old 09-04-2009, 08:50 AM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
ntfs is another type of file system. You must use the partinion name (example /dev/hda1) like this
Code:
mount -t ntfs /dev/hda1 /mnt/windows
Of course the mountpoint /mnt/windows must exit
 
Old 09-04-2009, 08:53 AM   #8
miros84
Member
 
Registered: Aug 2009
Location: Spain
Distribution: Debian stable, squeeze
Posts: 501

Original Poster
Rep: Reputation: 31
No, I mean ntfs partitions but it is on another computer, like the example above I gave you.
Look that. It is ok?

Code:
mount -t cifs //192.168.0.192/newexpbackup /mnt/newexpbackup
I have created the folder /mnt/newexpbackup
 
Old 09-04-2009, 09:03 AM   #9
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
It looks OK. If you got an error, then maybe you have to supply a username and/or password to access the share
If you want to mount remote windows share partition regardless the type (ntfs, fat32) you have to use cifs.

Regards
 
Old 09-04-2009, 09:15 AM   #10
miros84
Member
 
Registered: Aug 2009
Location: Spain
Distribution: Debian stable, squeeze
Posts: 501

Original Poster
Rep: Reputation: 31
The folder is public. I havenot got user or password. And the error I got is
Code:
missing codepage or helper program, or other error
       (for several filesystems (e.g. nfs, cifs) you might
       need a /sbin/mount.<type> helper program)
 
Old 09-04-2009, 09:19 AM   #11
miros84
Member
 
Registered: Aug 2009
Location: Spain
Distribution: Debian stable, squeeze
Posts: 501

Original Poster
Rep: Reputation: 31
Oo, I need sudo apt-get install smbfs
 
Old 09-04-2009, 09:20 AM   #12
jimjones
Member
 
Registered: May 2005
Location: Belgium
Distribution: slackware 10.2
Posts: 43

Rep: Reputation: 15
check if you have samba installed (more specific smbclient)
if you have an old linux you might have to use something like smbfs instead of cifs

http://www.cyberciti.biz/faq/configu...with-etcfstab/

Last edited by jimjones; 09-04-2009 at 09:23 AM.
 
Old 09-04-2009, 09:23 AM   #13
miros84
Member
 
Registered: Aug 2009
Location: Spain
Distribution: Debian stable, squeeze
Posts: 501

Original Poster
Rep: Reputation: 31
Well. I havenot got user and password. When I access with nautilius, I can access. But in terminal, I get that.
Code:
miro-test miro # mount -t cifs //192.168.0.192/newexpbackup /mnt/newexpbackup
Password: 
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs)
 
Old 09-04-2009, 10:17 AM   #14
miros84
Member
 
Registered: Aug 2009
Location: Spain
Distribution: Debian stable, squeeze
Posts: 501

Original Poster
Rep: Reputation: 31
Hi. I tried betwen mint and mint and everything was OK. I can mount it this way, but when I try between Mint and debian, then I have this problem above. Any idea?
 
Old 09-04-2009, 10:20 AM   #15
jimjones
Member
 
Registered: May 2005
Location: Belgium
Distribution: slackware 10.2
Posts: 43

Rep: Reputation: 15
i think you have to use guest with blank password - not sure on that tho
also have to enable the guest account on windows
 
  


Reply



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
Mount Network Location to Folder Cottsay General 1 01-31-2007 11:52 AM
samba: mount-folder in client gives only root permissions mvo Linux - Newbie 3 09-16-2005 11:39 AM
mount samba folder alaios Linux - Networking 2 07-23-2005 03:14 PM
samba mount to windows share folder lewkh Red Hat 1 03-01-2005 03:31 PM
can't mount to windows share folder using samba yawhum80 Linux - Software 4 10-24-2003 11:52 PM

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

All times are GMT -5. The time now is 07:47 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