LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-31-2014, 05:42 AM   #1
aagaag
Member
 
Registered: Aug 2014
Posts: 40

Rep: Reputation: Disabled
mounting an NTFS drive located on a different computer


i use Archlinux on server with IP address 10.10.10.10, and I wish to access an entire NTFS drive which belongs to a different computer that lives at 10.10.10.18.

I have installed NTFS-3G, and I modified the fstab - but I managed to prevent archlinux from booting. I recovered from that blunder, but now I'd rather get some advice. Also, I guess that I need to provide appropriate credentials for accessing the NTFS drive, and I have no idea of where to insert those.

many thanks in advance!
 
Old 08-31-2014, 06:24 AM   #2
gengisdave
Member
 
Registered: Dec 2013
Location: Turin, Italy
Distribution: slackware
Posts: 322

Rep: Reputation: 71
you can't mount remote filesystems that way, you must use nfs/samba/netatalk (it depends on the os installed to the computer owning the drive)
 
1 members found this post helpful.
Old 08-31-2014, 06:27 AM   #3
aagaag
Member
 
Registered: Aug 2014
Posts: 40

Original Poster
Rep: Reputation: Disabled
thank you for your advice. The host is a Win8.1 computer. What would I need to install for it to serve the drive to Linux? Thanks again.
 
Old 08-31-2014, 06:34 AM   #4
gengisdave
Member
 
Registered: Dec 2013
Location: Turin, Italy
Distribution: slackware
Posts: 322

Rep: Reputation: 71
On Win8, you must share the folder/partition (remember to set the appropriate read/write permissions).

On the Linux:
Code:
mount -t cifs //10.10.10.18/name_of_the_share /where/to/mount
from a root shell or preceded by 'sudo'.

To make this a permanent mount, add this to fstab:
Code:
//10.10.10.18/share_name /mount_point cifs rw,user,noauto 0 0
where rw means to mount it in write mode, user means a user can mount it and noauto means it won't be mounted during arch boot (delete it if you're sure the share is always available, or you have to wait several seconds at boot for the timeout)

ending zero means to don't check at mount/boot

ADD: two more parameters are needed if the mounted share belongs to root, so you don't have permissions to write or read : uid and gid

you can have this number simply by running 'id' in a shell
Code:
//10.10.10.18/share_name /mount_point cifs rw,user,noauto,uid=100,gid=200 0 0
means the mount user owner is 100 and the group owner is 200 (every user on linux have an unique uid and is a member of many gid - at least one)

Last edited by gengisdave; 08-31-2014 at 06:40 AM.
 
1 members found this post helpful.
Old 08-31-2014, 06:58 AM   #5
aagaag
Member
 
Registered: Aug 2014
Posts: 40

Original Poster
Rep: Reputation: Disabled
Thank you for your crystal-clear walk-through! I think that I am almost there. However, it seems that the command
Code:
sudo mount -t cifs //10.10.10.18/kellerpcroot /home/aag/test
wants to log into the share as root.

Code:
Password for root@//10.10.10.18/kellerpcroot
And it cannot, hence it throws:
Code:
mount error(13): Permission denied
How can I tell it to log in as user "aag" instead of root?
 
Old 08-31-2014, 07:05 AM   #6
aagaag
Member
 
Registered: Aug 2014
Posts: 40

Original Poster
Rep: Reputation: Disabled
never mind, I found the option -o username:foo
thanks!
 
Old 08-31-2014, 07:07 AM   #7
gengisdave
Member
 
Registered: Dec 2013
Location: Turin, Italy
Distribution: slackware
Posts: 322

Rep: Reputation: 71
Code:
sudo mount -t cifs //10.10.10.18/kellerpcroot /home/aag/test -o username=aag
basically, every option to mount must be preceded by '-o'

Code:
sudo mount -t cifs //10.10.10.18/kellerpcroot /home/aag/test -o username=aag -o rw
etc. see man mount.cifs for a full list

Last edited by gengisdave; 08-31-2014 at 07:09 AM.
 
1 members found this post helpful.
Old 08-31-2014, 07:10 AM   #8
aagaag
Member
 
Registered: Aug 2014
Posts: 40

Original Poster
Rep: Reputation: Disabled
..but I still have the problem that I do not know how to specify username and password in the fstab entry!
 
Old 08-31-2014, 07:22 AM   #9
gengisdave
Member
 
Registered: Dec 2013
Location: Turin, Italy
Distribution: slackware
Posts: 322

Rep: Reputation: 71
use credentials=filename, see man 'mount.cifs' for the filename syntax, be sure to protect the file (chmod 600)
 
  


Reply

Tags
authorization, mount point, ntfs


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
Can't see files located on an external NTFS drive when on NFS Client RickRick Linux - Newbie 2 10-27-2009 07:00 PM
mounting a NTFS drive.. tamere SUSE / openSUSE 4 07-16-2009 02:33 AM
mounting NTFS drive ceantuco Linux - Newbie 3 08-28-2008 04:45 PM
NTFS drive mounting linux_srinath Linux - Newbie 1 02-06-2006 09:04 AM
slackware 9.1 mounting problems (cd drive, cd writer drive, win partition (ntfs)) mr.gizm0 Slackware 8 05-11-2004 07:23 PM


All times are GMT -5. The time now is 06:39 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration