Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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 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?
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.
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.
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.
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?
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.