LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 03-17-2010, 02:07 AM   #1
vasanithyd
LQ Newbie
 
Registered: Mar 2010
Posts: 1

Rep: Reputation: 0
Question how to share a folder from linux to linux


how to share a folder from linux to linux systems and setting password to open that folder
 
Old 03-17-2010, 02:08 AM   #2
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 624

Rep: Reputation: 64
You can use SAMBA to do that.
 
Old 03-17-2010, 02:18 AM   #3
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by sayan_acharjee View Post
You can use SAMBA to do that.
But NFS would be a better choice because Samba is designed for sharing with Windows systems and the Linux ownerships-groupships-permissions model does not map readily into Windows' equivalents.
 
Old 03-17-2010, 02:29 AM   #4
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 624

Rep: Reputation: 64
Quote:
Originally Posted by catkin View Post
But NFS would be a better choice because Samba is designed for sharing with Windows systems and the Linux ownerships-groupships-permissions model does not map readily into Windows' equivalents.
But how will NFS ask for username and password for a specific user?
 
Old 03-17-2010, 04:27 AM   #5
freelinuxtutorials
Member
 
Registered: Oct 2009
Posts: 70

Rep: Reputation: 21
Quote:
Originally Posted by sayan_acharjee View Post
But how will NFS ask for username and password for a specific user?
if linux to linux, it is being controlled on /etc/exports for NFS server
and /etc/fstab for NFS client

You can specify user and IP address allowed to mount it on NFS server

Last edited by freelinuxtutorials; 03-17-2010 at 04:28 AM.
 
Old 03-17-2010, 04:38 AM   #6
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 624

Rep: Reputation: 64
Quote:
Originally Posted by freelinuxtutorials View Post
if linux to linux, it is being controlled on /etc/exports for NFS server
and /etc/fstab for NFS client

You can specify user and IP address allowed to mount it on NFS server
I know specific ip can be specified in the /etc/exports file which will be able to mount the share, here we are talking about user name and password from a specific ip, i.e., from the same ip one user will be able to mount it with correct user name and password and others can't.
 
Old 03-17-2010, 05:07 AM   #7
freelinuxtutorials
Member
 
Registered: Oct 2009
Posts: 70

Rep: Reputation: 21
Quote:
Originally Posted by sayan_acharjee View Post
I know specific ip can be specified in the /etc/exports file which will be able to mount the share, here we are talking about user name and password from a specific ip, i.e., from the same ip one user will be able to mount it with correct user name and password and others can't.
Then SMB share is the right way to do it. and choose any db backend that you want for storing username/pass.
 
Old 03-17-2010, 05:10 AM   #8
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 624

Rep: Reputation: 64
Quote:
Originally Posted by freelinuxtutorials View Post
Then SMB share is the right way to do it. and choose any db backend that you want for storing username/pass.
Thats what I said to OP in my first post in this thread.
 
Old 03-17-2010, 05:24 AM   #9
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 70
There are more than two network filesystems; and SAMBA is, frankly, a horrible piece of advice.

Consider how one mounts NFS , and consider the options in /etc/exports.
Code:
man exports
should be read before making decisions based upon how you can use it.

But what about SSHFS? The SSH File System? Thats a good way of using native ACLs and so on.
In fact, there are several ways and methods that work if NFS does not have the options you want.

samba, however, is not one of these; nor has it ever, nor will it be.
 
Old 03-17-2010, 05:30 AM   #10
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 624

Rep: Reputation: 64
Quote:
Originally Posted by jamescondron View Post
There are more than two network filesystems; and SAMBA is, frankly, a horrible piece of advice.

Consider how one mounts NFS , and consider the options in /etc/exports.
Code:
man exports
should be read before making decisions based upon how you can use it.

But what about SSHFS? The SSH File System? Thats a good way of using native ACLs and so on.
In fact, there are several ways and methods that work if NFS does not have the options you want.

samba, however, is not one of these; nor has it ever, nor will it be.
OP wanted to share a directory in such a way that whenever a user wants to access it from a remote system, it will ask for user name and password.
Samba is what came to my mind for the first time 'cos this can be achieved with samba, am I wrong there? I'd like to know how samba doesn't fit according to the OP's criteria?
 
Old 03-17-2010, 05:38 AM   #11
freelinuxtutorials
Member
 
Registered: Oct 2009
Posts: 70

Rep: Reputation: 21
Quote:
Originally Posted by sayan_acharjee View Post
Thats what I said to OP in my first post in this thread.
haha.sorry. i got carried away on the NFS posts.
if you want to have username/password prompting user on shared folders. I will do it by samba as well.
 
Old 03-17-2010, 05:47 AM   #12
blacky_5251
Member
 
Registered: Oct 2004
Location: Adelaide Hills, South Australia
Distribution: RHEL 5&6 CentOS 5, 6 & 7
Posts: 573

Rep: Reputation: 61
It would be good if the OP gave more information about what needed to be mounted. When I first read his post, autofs came to mind but I was thinking/assuming he might have been talking about home dirs.
 
Old 03-17-2010, 06:11 AM   #13
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by sayan_acharjee View Post
But how will NFS ask for username and password for a specific user?
Good point and my apologies for missing that
 
Old 03-17-2010, 06:13 AM   #14
Sayan Acharjee
Member
 
Registered: Feb 2010
Location: Chennai, India
Distribution: Manjaro
Posts: 624

Rep: Reputation: 64
Quote:
Originally Posted by catkin View Post
Good point and my apologies for missing that
Happens By the way, can I send you a friend request?
 
Old 03-17-2010, 06:19 AM   #15
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 70
Quote:
Originally Posted by sayan_acharjee View Post
OP wanted to share a directory in such a way that whenever a user wants to access it from a remote system, it will ask for user name and password.
Samba is what came to my mind for the first time 'cos this can be achieved with samba, am I wrong there? I'd like to know how samba doesn't fit according to the OP's criteria?
Its a little like OP wanting to drive a nail into a wall, and you suggesting a stale turnip. Yeah, it'd be hard enough, and yeah it'd work, but turnips are not a tool we should be using.

samba is not a viable tool for *nix systems because of the major differences between permissions, ACLs and authentication. Which is why I suggested OP looks at what NFS can/cannot be configured to do and possibly use sshfs.

In this case sshfs is the most viable option; sshfs is the hammer the nail needs.
 
  


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
Share Linux Folder with Windows XP oozypal Debian 1 07-15-2008 01:56 PM
share a windows folder in Linux Linuxfan0001 Linux - Newbie 3 04-09-2008 01:21 AM
Share Linux Folder to Windows chuchsn Linux - Newbie 5 04-04-2008 08:24 AM
share folder on Linux to Windows ashley75 Linux - General 3 06-10-2005 04:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:57 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
Open Source Consulting | Domain Registration